@Override
    public void copySources( HashMap<String, Source> srcMap )
    {
        if( srcMap == null )
            return;
        Set<String> keys = srcMap.keySet();
        Iterator<String> iter = keys.iterator();        
        String sourcename;
        Source source;
        
        // Make sure the buffer map exists:
        if( bufferMap == null )
        {
            bufferMap = new HashMap<String, SoundBuffer>();
            importantMessage( "Buffer Map was null in method 'copySources'" );
        }
        
        // remove any existing sources before starting:
        sourceMap.clear();
        
        SoundBuffer buffer;
        // loop through and copy all the sources:
        while( iter.hasNext() )
        {
            sourcename = iter.next();
            source = srcMap.get( sourcename );
            if( source != null )
            {
                buffer = null;
                if( !source.toStream )
                {
                    loadSound( source.filenameURL );
                    buffer = bufferMap.get( source.filenameURL.getFilename() );
                }
                if( !source.toStream && buffer != null )
                {
                    buffer.trimData( maxClipSize );
                }
                if( source.toStream || buffer != null )
                {
                    sourceMap.put( sourcename, new SourceJavaSound( listener,
                                                             source, buffer ) );
                }
            }
        }
    }