I want to send a wav file through a mixer and then pass the output to LAME to create an mp3. I've got most of it worked out but I am missing one critical piece.
Here is the idea (not the actual code):
int stream = BASS_StreamCreateFile("input.wav", 0, 0, BASSFlag.BASS_STREAM_DECODE);
BASS_CHANNELINFO info = BASS_ChannelGetInfo(stream);
int mixer = BassMix.BASS_Mixer_StreamCreate(info.freq, 2, BASSFlag.BASS_DEFAULT);
... set up mixer as needed ...
Misc.EncoderLAME encoder = new Misc.EncoderLAME(mixer);
encoder.LAME_Mode = EncoderLAME.LAMEMode.Mono;
encoder.LAME_Bitrate = Misc.EncoderLAME.BITRATE.kbps_16;
encoder.OutputFile = "output.mp3";
encoder.Start(null, 0, false);
... what goes here? ...
encoder.Stop();
My question is: How do I cause the mixer to send its output to the encoder?
Thanks,
Mark