lib/minim/src/ddf/minim/Minim.java
/**
	 * Loads the requested file into an {@link AudioPlayer} with the request
	 * buffer size.
	 * 
	 * @param filename
	 *            the file or URL you want to load
	 * @param bufferSize
	 *            int: the sample buffer size you want, which determines the 
	 *            size of the left, right, and mix AudioBuffer fields of the 
	 *            returned AudioPlayer.
	 * 
	 * @return an <code>AudioPlayer</code> with a sample buffer of the requested
	 *         size, or null if we were unable to load the file
	 */
Loads the requested file into an  AudioPlayer with the request
buffer size.

@param filename
the file or URL you want to load
@param bufferSize
int: the sample buffer size you want, which determines the
size of the left, right, and mix AudioBuffer fields of the
returned AudioPlayer.

@return an AudioPlayer with a sample buffer of the requested
size, or null if we were unable to load the file
Loads the requested file into an AudioPlayer with the request buffer size . @param filename the file or URL you want to load @param bufferSize int : the sample buffer size you want which determines the size of the left right and mix AudioBuffer fields of the returned AudioPlayer . @return an AudioPlayer with a sample buffer of the requested size or null if we were unable to load the file
public AudioPlayer loadFile(String filename, int bufferSize)
	{
		AudioPlayer player 			= null;
		AudioRecordingStream rec 	= mimp.getAudioRecordingStream( filename, bufferSize, false );
		if ( rec != null )
		{
			AudioFormat format 	= rec.getFormat();
			AudioOut out 		= mimp.getAudioOutput( format.getChannels(),
													   bufferSize, 
													   format.getSampleRate(),
													   format.getSampleSizeInBits() );
			if ( out != null )
			{
				player = new AudioPlayer( rec, out );
			}
			else
			{
				rec.close();
			}
		}
		if ( player != null )
		{
			addSource( player );
		}
		else
		{
			error( "Couldn't load the file " + filename );
		}
		return player;
	}
public AudioPlayer loadFile ( String filename , int bufferSize ) { AudioPlayer player = null ; AudioRecordingStream rec = mimp . getAudioRecordingStream ( filename , bufferSize , false ) ; if ( rec != null ) { AudioFormat format = rec . getFormat ( ) ; AudioOut out = mimp . getAudioOutput ( format . getChannels ( ) , bufferSize , format . getSampleRate ( ) , format . getSampleSizeInBits ( ) ) ; if ( out != null ) { player = new AudioPlayer ( rec , out ) ; } else { rec . close ( ) ; } } if ( player != null ) { addSource ( player ) ; } else { error ( "Couldn't load the file " + filename ) ; } return player ; }
Loads the requested file into an {@link AudioPlayer} with the request
 buffer size.
Loads the requested file into an { @link AudioPlayer } with the request buffer size .