Using this example code on a HTC Touch (WM6), the recording is stopped suddenly after 20 seconds.
Anyone know why I respond?
Thank you!
private RECORDPROC _myRecProc; // make it global, so that the Garbage Collector can not remove it
...
Bass.BASS_RecordInit(-1);
_myRecProc = new RECORDPROC(MyRecording);
// start recording paused
int recChannel = Bass.BASS_RecordStart(44100, 2, BASSFlag.BASS_RECORD_PAUSE, _myRecProc, IntPtr.Zero);
...
// really start recording
Bass.BASS_ChannelPlay(recChannel, false);
...
// the recording callback
private bool MyRecording(int handle, IntPtr buffer, int length, IntPtr user)
{
return true;
}
EncoderWAV wav = new EncoderWAV(recHandle);
wav.InputFile = null;
wav.OutputFile = "test.wav";
wav.Start(null, IntPtr.Zero, false);
// your recording will be encoded until you call...
wav.Stop();