protected void update (float time)
    {
        // update fade, which may stop playing
        updateFade(time);
        if (_state != AL10.AL_PLAYING) {
            return;
        }

        // find out how many buffers have been played and unqueue them
        int played = _source.getBuffersProcessed();
        if (played == 0) {
            return;
        }
        for (int ii = 0; ii < played; ii++) {
            _source.unqueueBuffers(_buffers[_qidx]);
            _qidx = (_qidx + 1) % _buffers.length;
            _qlen--;
        }

        // enqueue up to the number of buffers played
        queueBuffers(played);

        // find out if we're still playing; if not and we have buffers queued, we must restart
        _state = _source.getSourceState();
        if (_qlen > 0 && _state != AL10.AL_PLAYING) {
            play();
        }
    }
protected void update ( float time ) { updateFade ( time ) ; if ( _state != AL10 . AL_PLAYING ) { return ; } int played = _source . getBuffersProcessed ( ) ; if ( played == 0 ) { return ; } for ( int ii = 0 ; ii < played ; ii ++ ) { _source . unqueueBuffers ( _buffers [ _qidx ] ) ; _qidx = ( _qidx + 1 ) % _buffers . length ; _qlen -- ; } queueBuffers ( played ) ; _state = _source . getSourceState ( ) ; if ( _qlen > 0 && _state != AL10 . AL_PLAYING ) { play ( ) ; } }
Updates the state of this stream, loading data into buffers and adjusting gain as necessary.
Called periodically by the {@link SoundManager}.

@param time the amount of time elapsed since the last update