@Override
    public void flush()
    {
        // Only a streaming source can be flushed, because only streaming
        // sources have queued buffers:
        if( channelType != SoundSystemConfig.TYPE_STREAMING )
            return;
        
        // determine how many buffers have been queued:
        int queued = AL10.alGetSourcei( ALSource.get( 0 ),
                                        AL10.AL_BUFFERS_QUEUED );
        // Check for errors:
        if( checkALError() )
            return;
        
        IntBuffer intBuffer = BufferUtils.createIntBuffer( 1 );
        while( queued > 0 )
        {
            try
            {
                AL10.alSourceUnqueueBuffers( ALSource.get( 0 ), intBuffer );
            }
            catch( Exception e )
            {
                return;
            }
            if( checkALError() )
                return;
            queued--;
        }
       	millisPreviouslyPlayed = 0;
    }