@Override
    public boolean queueBuffer( byte[] buffer )
    {
        // Stream buffers can only be queued for streaming sources:
        if( errorCheck( channelType != SoundSystemConfig.TYPE_STREAMING,
                        "Buffers may only be queued for streaming sources." ) )
            return false;
        
        // Make sure we have a SourceDataLine:
        if( errorCheck( sourceDataLine == null,
                        "SourceDataLine null in method 'queueBuffer'." ) )
            return false;
        
        // make sure a format was specified:
        if( errorCheck( myFormat == null,
                        "AudioFormat null in method 'queueBuffer'" ) )
            return false;
        
        // Queue a new buffer:
        streamBuffers.add( new SoundBuffer( buffer, myFormat ) );
        
        // Dequeue a buffer and process it:
        processBuffer();
        
        processed = 0;
        return true;
    }