public SoundBuffer readAll()
    {
        if( module == null )
        {
            errorMessage( "Module null in method 'readAll'" );
            return null;
        }

        // Check to make sure there is an audio format:
        if( myAudioFormat == null )
        {
            errorMessage( "Audio Format null in method 'readAll'" );
            return null;
        }

        int bufferFrameSize = (int) SoundSystemConfig.getFileChunkSize()
                                    / 4;

		byte[] outputBuffer = new byte[ bufferFrameSize * 4 ];

        // Buffer to contain the audio data:
        byte[] fullBuffer = null;
        // frames of audio data:
        int frames;
        // bytes of audio data:
        int totalBytes = 0;

        while( (!endOfStream(GET, XXX)) &&
               (totalBytes < SoundSystemConfig.getMaxFileSize()) )
        {
            frames = songDuration - playPosition;
            if( frames > bufferFrameSize )
                frames = bufferFrameSize;
            ibxm.get_audio( outputBuffer, frames );
            totalBytes += (frames * 4);

            fullBuffer = appendByteArrays( fullBuffer, outputBuffer,
                                           frames * 4 );

            playPosition += frames;
            if( playPosition >= songDuration )
            {
                endOfStream( SET, true );
            }
        }

        // Reverse the byte order if necessary:
        if( reverseBytes )
            reverseBytes( fullBuffer, 0, totalBytes );

        // Wrap the data into a SoundBuffer:
        SoundBuffer buffer = new SoundBuffer( fullBuffer, myAudioFormat );

        return buffer;
    }