@Override
    public void newSource( boolean priority, boolean toStream, boolean toLoop,
                           String sourcename, FilenameURL filenameURL, float x,
                           float y, float z, int attModel, float distOrRoll )
    {
        SoundBuffer buffer = null;
        
        if( !toStream )
        {
            // Grab the audio data for this file:
            buffer = bufferMap.get( filenameURL.getFilename() );
            // if not found, try loading it:
            if( buffer == null )
            {
                if( !loadSound( filenameURL ) )
                {
                    errorMessage( "Source '" + sourcename + "' was not created "
                                  + "because an error occurred while loading "
                                  + filenameURL.getFilename() );
                    return;
                }
            }
            // try and grab the sound buffer again:
            buffer = bufferMap.get( filenameURL.getFilename() );
            // see if it was there this time:
            if( buffer == null )
            {
                errorMessage( "Source '" + sourcename + "' was not created "
                              + "because audio data was not found for "
                              + filenameURL.getFilename() );
                return;
            }
        }
        
        if( !toStream && buffer != null )
            buffer.trimData( maxClipSize );
        
        sourceMap.put( sourcename,
                       new SourceJavaSound( listener, priority, toStream,
                                            toLoop, sourcename, filenameURL,
                                            buffer, x, y, z, attModel,
                                            distOrRoll, false ) );
    }