Thanks for your reply.. I currently have it setup as follows:
public Boolean startBroadcast(string name_mountpoint, string broadcaster_fullname)
{
//initialise recording:
_recProc = new RECORDPROC(RecordingHandler);
//Start recording op 44,1kHz stereo:
if (_recHandle != 0) Bass.BASS_ChannelStop(_recHandle);
//_recHandle = Bass.BASS_RecordStart(44100, 2, BASSFlag.BASS_DEFAULT, _recProc, IntPtr.Zero);
_recHandle = Bass.BASS_RecordStart(44100, 2, BASSFlag.BASS_DEFAULT, null, IntPtr.Zero);
if (_recHandle == Bass.FALSE)
{
MessageBox.Show("Unfortunatly there was an error initialising the voice recording functionality: "+Bass.BASS_ErrorGetCode()+".\n\nPlease restart and try again.");
return (false);
}
//create main mixing channel/stream:
_mixerStream = BassMix.BASS_Mixer_StreamCreate(44100, 2, BASSFlag.BASS_DEFAULT);
BassMix.BASS_Mixer_StreamAddChannel(_mixerStream, _recHandle, BASSFlag.BASS_STREAM_AUTOFREE | BASSFlag.BASS_MIXER_DOWNMIX);
IBaseEncoder encoder = null;
IStreamingServer IceCastServer = null;
//EncoderLAME lame = new EncoderLAME(_recHandle);
EncoderLAME lame = new EncoderLAME(_mixerStream);
lame.InputFile = null;
lame.OutputFile = null;
lame.LAME_Bitrate = 128;
lame.LAME_Mode = EncoderLAME.LAMEMode.Default;
lame.LAME_TargetSampleRate = (int)EncoderLAME.SAMPLERATE.Hz_44100;
lame.LAME_Quality = EncoderLAME.LAMEQuality.Speed;
lame.EncoderDirectory = Application.StartupPath;
if (lame.EncoderExists) encoder = lame;
else
{
MessageBox.Show("The file LAME.EXE can not be found, the installation might be corrupt !", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return (false);
}
//de stream naar Icecast instellen:
ICEcast icecast = new ICEcast(encoder, true); //True: bass.dll handelt alles af
icecast.ServerAddress = _serverAdress;
icecast.ServerPort = _serverPort;
...
...
The code is followed by an Autoconnect() ofcourse. However the stream is setup but it is completely silent since I changed _RecProc to NULL(disabled callback). Im a supposed to do something else now the callback is gone, or am I missing something else ?
(the example is just settings up a broadcast to Icecast via a mixing channel. not adding a second listening channel as of yet)