I am writing an audio encoder that takes the input from the microphone and convert it to ogg
file. I am using the media_stream_audio
example
The following function keeps working even when I click stop recording which is suppose cancel this operation. I tried to have a separate thread to handle this but it did not work.
My question is how can I stop this schedule when the flag is_recording
is false? if I can not what is the best approach to do this
void ScheduleNextTimer() {
PP_DCHECK(timer_interval_ > 0);
pp::Module::Get()->core()->CallOnMainThread(
timer_interval_,
callback_factory_.NewCallback(&MediaStreamAudioInstance::OnTimer),
0);
}