@Override
    public boolean processBuffer()
    {
        // Stream buffers can only be queued for streaming sources:
        if( errorCheck( channelType != SoundSystemConfig.TYPE_STREAMING,
                        "Buffers are only processed for streaming sources." ) )
            return false;
        
        // Make sure we have a SourceDataLine:
        if( errorCheck( sourceDataLine == null,
                        "SourceDataLine null in method 'processBuffer'." ) )
            return false;
        
        if( streamBuffers == null || streamBuffers.isEmpty() )
            return false;
        
        // Dequeue a buffer and feed it to the SourceDataLine:
        SoundBuffer nextBuffer = streamBuffers.remove( 0 );

        sourceDataLine.write( nextBuffer.audioData, 0,
                              nextBuffer.audioData.length );
        if( !sourceDataLine.isActive() )
            sourceDataLine.start();
        nextBuffer.cleanup();
        nextBuffer = null;
        
        return true;
    }