lib/minim/src/ddf/minim/javasound/JSBaseAudioRecordingStream.java
// that we should wrap around to the beginning
that we should wrap around to the beginning
that we should wrap around to the beginning
private void readBytesWrap(int toRead, int offset)
    {
        int bytesRead = 0;
        try
        {
            while ( bytesRead < toRead )
            {
                int actualRead = 0;
                synchronized ( ais )
                {
                    actualRead = ais.read( rawBytes, bytesRead + offset, toRead - bytesRead );
                }
                if ( -1 == actualRead )
                {
                    setMillisecondPosition( 0 );
                    if ( numLoops != Minim.LOOP_CONTINUOUSLY )
                    {
                        numLoops--;
                    }
                }
                else if ( actualRead == 0 )
                {
                    break;
                }
                else
                {
                    bytesRead += actualRead;
                    totalBytesRead += actualRead;
                }
            }
        }
        catch ( IOException ioe )
        {
            system.error( "Error reading from the file - " + ioe.getMessage() );
        }
    }
private void readBytesWrap ( int toRead , int offset ) { int bytesRead = 0 ; try { while ( bytesRead < toRead ) { int actualRead = 0 ; synchronized ( ais ) { actualRead = ais . read ( rawBytes , bytesRead + offset , toRead - bytesRead ) ; } if ( - 1 == actualRead ) { setMillisecondPosition ( 0 ) ; if ( numLoops != Minim . LOOP_CONTINUOUSLY ) { numLoops -- ; } } else if ( actualRead == 0 ) { break ; } else { bytesRead += actualRead ; totalBytesRead += actualRead ; } } } catch ( IOException ioe ) { system . error ( "Error reading from the file - " + ioe . getMessage ( ) ) ; } }
that we should wrap around to the beginning
that we should wrap around to the beginning
//System.out.println("!!!!!!! Looping with numLoops " + numLoops); // we want to prevent an infinite loop // but this will hopefully never happen because // we set the loop end point with a frame aligned byte // number