Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(547)

Unified Diff: webrtc/modules/audio_device/audio_device_buffer.h

Issue 2482053003: AudioDeviceBuffer now uses 16-bit buffers (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_device/audio_device_buffer.h
diff --git a/webrtc/modules/audio_device/audio_device_buffer.h b/webrtc/modules/audio_device/audio_device_buffer.h
index f5f8f1d2207d0be59cb85a761081a70f10850b75..621b9283f2b6cd242568dfa40a7a1a10da6477f0 100644
--- a/webrtc/modules/audio_device/audio_device_buffer.h
+++ b/webrtc/modules/audio_device/audio_device_buffer.h
@@ -154,12 +154,13 @@ class AudioDeviceBuffer {
bool recording_ ACCESS_ON(main_thread_checker_);
// Buffer used for audio samples to be played out. Size can be changed
- // dynamically.
- rtc::Buffer play_buffer_ ACCESS_ON(playout_thread_checker_);
+ // dynamically. Each sample (or audio sample frame) has a size given by
+ // #channels * sizeof(uint16_t) bytes since WebRTC uses 16-bit PCM audio.
+ rtc::BufferT<uint16_t> play_buffer_ ACCESS_ON(playout_thread_checker_);
// Byte buffer used for recorded audio samples. Size can be changed
// dynamically.
- rtc::Buffer rec_buffer_ ACCESS_ON(recording_thread_checker_);
+ rtc::BufferT<uint16_t> rec_buffer_ ACCESS_ON(recording_thread_checker_);
// AGC parameters.
#if !defined(WEBRTC_WIN)
« no previous file with comments | « no previous file | webrtc/modules/audio_device/audio_device_buffer.cc » ('j') | webrtc/modules/audio_device/audio_device_buffer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698