Remove unused members from AudioDeviceBuffer
Removes current_mic_level_, new_mic_level_ and clock_drift_, together with APIs for accessing them. Bug: webrtc:8598 Change-Id: I8e07396fcafd2a719e204730e2c7d26797bed762 Reviewed-on: https://webrtc-review.googlesource.com/39783 Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org> Reviewed-by: Henrik Andreassson <henrika@webrtc.org> Cr-Commit-Position: refs/heads/master@{#21632}
This commit is contained in:
committed by
Commit Bot
parent
d980c57c80
commit
1a50cd5894
@ -50,12 +50,9 @@ AudioDeviceBuffer::AudioDeviceBuffer()
|
||||
play_channels_(0),
|
||||
playing_(false),
|
||||
recording_(false),
|
||||
current_mic_level_(0),
|
||||
new_mic_level_(0),
|
||||
typing_status_(false),
|
||||
play_delay_ms_(0),
|
||||
rec_delay_ms_(0),
|
||||
clock_drift_(0),
|
||||
num_stat_reports_(0),
|
||||
last_timer_task_time_(0),
|
||||
rec_stat_count_(0),
|
||||
@ -231,15 +228,6 @@ size_t AudioDeviceBuffer::PlayoutChannels() const {
|
||||
return play_channels_;
|
||||
}
|
||||
|
||||
int32_t AudioDeviceBuffer::SetCurrentMicLevel(uint32_t level) {
|
||||
#if !defined(WEBRTC_WIN)
|
||||
// Windows uses a dedicated thread for volume APIs.
|
||||
RTC_DCHECK_RUN_ON(&recording_thread_checker_);
|
||||
#endif
|
||||
current_mic_level_ = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t AudioDeviceBuffer::SetTypingStatus(bool typing_status) {
|
||||
RTC_DCHECK_RUN_ON(&recording_thread_checker_);
|
||||
typing_status_ = typing_status;
|
||||
@ -252,18 +240,11 @@ void AudioDeviceBuffer::NativeAudioInterrupted() {
|
||||
recording_thread_checker_.DetachFromThread();
|
||||
}
|
||||
|
||||
uint32_t AudioDeviceBuffer::NewMicLevel() const {
|
||||
RTC_DCHECK_RUN_ON(&recording_thread_checker_);
|
||||
return new_mic_level_;
|
||||
}
|
||||
|
||||
void AudioDeviceBuffer::SetVQEData(int play_delay_ms,
|
||||
int rec_delay_ms,
|
||||
int clock_drift) {
|
||||
int rec_delay_ms) {
|
||||
RTC_DCHECK_RUN_ON(&recording_thread_checker_);
|
||||
play_delay_ms_ = play_delay_ms;
|
||||
rec_delay_ms_ = rec_delay_ms;
|
||||
clock_drift_ = clock_drift;
|
||||
}
|
||||
|
||||
int32_t AudioDeviceBuffer::SetRecordedBuffer(const void* audio_buffer,
|
||||
@ -307,15 +288,13 @@ int32_t AudioDeviceBuffer::DeliverRecordedData() {
|
||||
}
|
||||
const size_t frames = rec_buffer_.size() / rec_channels_;
|
||||
const size_t bytes_per_frame = rec_channels_ * sizeof(int16_t);
|
||||
uint32_t new_mic_level(0);
|
||||
uint32_t new_mic_level_dummy = 0;
|
||||
uint32_t total_delay_ms = play_delay_ms_ + rec_delay_ms_;
|
||||
int32_t res = audio_transport_cb_->RecordedDataIsAvailable(
|
||||
rec_buffer_.data(), frames, bytes_per_frame, rec_channels_,
|
||||
rec_sample_rate_, total_delay_ms, clock_drift_, current_mic_level_,
|
||||
typing_status_, new_mic_level);
|
||||
if (res != -1) {
|
||||
new_mic_level_ = new_mic_level;
|
||||
} else {
|
||||
rec_sample_rate_, total_delay_ms, 0, 0, typing_status_,
|
||||
new_mic_level_dummy);
|
||||
if (res == -1) {
|
||||
RTC_LOG(LS_ERROR) << "RecordedDataIsAvailable() failed";
|
||||
}
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user