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

Side by Side Diff: webrtc/modules/audio_device/audio_device_buffer.h

Issue 2117303002: Minor refactoring of the AudioDeviceBuffer class (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Feedback from magjed@ Created 4 years, 5 months 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 unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/modules/audio_device/audio_device_buffer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 10 matching lines...) Expand all
21 const uint32_t kPulsePeriodMs = 1000; 21 const uint32_t kPulsePeriodMs = 1000;
22 const size_t kMaxBufferSizeBytes = 3840; // 10ms in stereo @ 96kHz 22 const size_t kMaxBufferSizeBytes = 3840; // 10ms in stereo @ 96kHz
23 23
24 class AudioDeviceObserver; 24 class AudioDeviceObserver;
25 25
26 class AudioDeviceBuffer { 26 class AudioDeviceBuffer {
27 public: 27 public:
28 AudioDeviceBuffer(); 28 AudioDeviceBuffer();
29 virtual ~AudioDeviceBuffer(); 29 virtual ~AudioDeviceBuffer();
30 30
31 void SetId(uint32_t id); 31 void SetId(uint32_t id) {};
32 int32_t RegisterAudioCallback(AudioTransport* audioCallback); 32 int32_t RegisterAudioCallback(AudioTransport* audioCallback);
33 33
34 int32_t InitPlayout(); 34 int32_t InitPlayout();
35 int32_t InitRecording(); 35 int32_t InitRecording();
36 36
37 virtual int32_t SetRecordingSampleRate(uint32_t fsHz); 37 virtual int32_t SetRecordingSampleRate(uint32_t fsHz);
38 virtual int32_t SetPlayoutSampleRate(uint32_t fsHz); 38 virtual int32_t SetPlayoutSampleRate(uint32_t fsHz);
39 int32_t RecordingSampleRate() const; 39 int32_t RecordingSampleRate() const;
40 int32_t PlayoutSampleRate() const; 40 int32_t PlayoutSampleRate() const;
41 41
(...skipping 14 matching lines...) Expand all
56 virtual int32_t GetPlayoutData(void* audioBuffer); 56 virtual int32_t GetPlayoutData(void* audioBuffer);
57 57
58 int32_t StartInputFileRecording(const char fileName[kAdmMaxFileNameSize]); 58 int32_t StartInputFileRecording(const char fileName[kAdmMaxFileNameSize]);
59 int32_t StopInputFileRecording(); 59 int32_t StopInputFileRecording();
60 int32_t StartOutputFileRecording(const char fileName[kAdmMaxFileNameSize]); 60 int32_t StartOutputFileRecording(const char fileName[kAdmMaxFileNameSize]);
61 int32_t StopOutputFileRecording(); 61 int32_t StopOutputFileRecording();
62 62
63 int32_t SetTypingStatus(bool typingStatus); 63 int32_t SetTypingStatus(bool typingStatus);
64 64
65 private: 65 private:
66 int32_t _id;
67 CriticalSectionWrapper& _critSect; 66 CriticalSectionWrapper& _critSect;
68 CriticalSectionWrapper& _critSectCb; 67 CriticalSectionWrapper& _critSectCb;
69 68
70 AudioTransport* _ptrCbAudioTransport; 69 AudioTransport* _ptrCbAudioTransport;
71 70
72 uint32_t _recSampleRate; 71 uint32_t _recSampleRate;
73 uint32_t _playSampleRate; 72 uint32_t _playSampleRate;
74 73
75 size_t _recChannels; 74 size_t _recChannels;
76 size_t _playChannels; 75 size_t _playChannels;
(...skipping 29 matching lines...) Expand all
106 105
107 int _playDelayMS; 106 int _playDelayMS;
108 int _recDelayMS; 107 int _recDelayMS;
109 int _clockDrift; 108 int _clockDrift;
110 int high_delay_counter_; 109 int high_delay_counter_;
111 }; 110 };
112 111
113 } // namespace webrtc 112 } // namespace webrtc
114 113
115 #endif // WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_BUFFER_H 114 #endif // WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_BUFFER_H
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/audio_device/audio_device_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698