@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'");
        }
        // Make sure the OpenAL buffer map exists:
        if (ALBufferMap == null) {
            ALBufferMap = new HashMap<String, IntBuffer>();
            importantMessage("Open AL 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) {
                    sourceMap.put(sourcename, new SourceLWJGLOpenAL(
                            listenerPositionAL,
                            ALBufferMap.get(
                                    source.filenameURL.getFilename()),
                            source, buffer));
                }
            }
        }
    }