Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Commit

Permalink
Reset counters when stop recording. (#732)
Browse files Browse the repository at this point in the history
Capturer caculates the time of next GenerateFramesForNext10Ms based on these
counters. If they are not reset when stop recording, new session will send out
too much data in the begining.
  • Loading branch information
jianjunz authored Sep 1, 2023
1 parent 8ae3944 commit 829a962
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions talk/owt/sdk/base/customizedaudiocapturer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ int32_t CustomizedAudioCapturer::StopRecording() {
recording_ = false;
mutex_.Unlock();
thread_rec_.Finalize();
last_call_record_millis_ = 0;
last_thread_rec_end_time_ = 0;
need_sleep_ms_ = 0;
real_sleep_ms_ = 0;
return 0;
}
bool CustomizedAudioCapturer::Recording() const {
Expand Down

0 comments on commit 829a962

Please sign in to comment.