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

Side by Side Diff: webrtc/modules/audio_device/test/func_test_manager.h

Issue 1172163004: Reformat existing code. There should be no functional effects. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Resync Created 5 years, 6 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
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 WarningCode _warning; 78 WarningCode _warning;
79 }; 79 };
80 80
81 // ---------------------------------------------------------------------------- 81 // ----------------------------------------------------------------------------
82 // AudioTransport 82 // AudioTransport
83 // ---------------------------------------------------------------------------- 83 // ----------------------------------------------------------------------------
84 84
85 class AudioTransportImpl: public AudioTransport 85 class AudioTransportImpl: public AudioTransport
86 { 86 {
87 public: 87 public:
88 virtual int32_t 88 int32_t RecordedDataIsAvailable(const void* audioSamples,
89 RecordedDataIsAvailable(const void* audioSamples, 89 const uint32_t nSamples,
90 const uint32_t nSamples, 90 const uint8_t nBytesPerSample,
91 const uint8_t nBytesPerSample, 91 const uint8_t nChannels,
92 const uint8_t nChannels, 92 const uint32_t samplesPerSec,
93 const uint32_t samplesPerSec, 93 const uint32_t totalDelayMS,
94 const uint32_t totalDelayMS, 94 const int32_t clockDrift,
95 const int32_t clockDrift, 95 const uint32_t currentMicLevel,
96 const uint32_t currentMicLevel, 96 const bool keyPressed,
97 const bool keyPressed, 97 uint32_t& newMicLevel) override;
98 uint32_t& newMicLevel);
99 98
100 virtual int32_t NeedMorePlayData(const uint32_t nSamples, 99 int32_t NeedMorePlayData(const uint32_t nSamples,
101 const uint8_t nBytesPerSample, 100 const uint8_t nBytesPerSample,
102 const uint8_t nChannels, 101 const uint8_t nChannels,
103 const uint32_t samplesPerSec, 102 const uint32_t samplesPerSec,
104 void* audioSamples, 103 void* audioSamples,
105 uint32_t& nSamplesOut, 104 uint32_t& nSamplesOut,
106 int64_t* elapsed_time_ms, 105 int64_t* elapsed_time_ms,
107 int64_t* ntp_time_ms); 106 int64_t* ntp_time_ms) override;
108 107
109 virtual int OnDataAvailable(const int voe_channels[], 108 int OnDataAvailable(const int voe_channels[],
110 int number_of_voe_channels, 109 int number_of_voe_channels,
111 const int16_t* audio_data, 110 const int16_t* audio_data,
112 int sample_rate, 111 int sample_rate,
113 int number_of_channels, 112 int number_of_channels,
114 int number_of_frames, 113 int number_of_frames,
115 int audio_delay_milliseconds, 114 int audio_delay_milliseconds,
116 int current_volume, 115 int current_volume,
117 bool key_pressed, 116 bool key_pressed,
118 bool need_audio_processing); 117 bool need_audio_processing) override;
119 118
120 virtual void PushCaptureData(int voe_channel, const void* audio_data, 119 void PushCaptureData(int voe_channel, const void* audio_data,
121 int bits_per_sample, int sample_rate, 120 int bits_per_sample, int sample_rate,
122 int number_of_channels, 121 int number_of_channels,
123 int number_of_frames); 122 int number_of_frames) override;
124 123
125 virtual void PullRenderData(int bits_per_sample, int sample_rate, 124 void PullRenderData(int bits_per_sample, int sample_rate,
126 int number_of_channels, int number_of_frames, 125 int number_of_channels, int number_of_frames,
127 void* audio_data, 126 void* audio_data,
128 int64_t* elapsed_time_ms, 127 int64_t* elapsed_time_ms,
129 int64_t* ntp_time_ms); 128 int64_t* ntp_time_ms) override;
130 129
131 AudioTransportImpl(AudioDeviceModule* audioDevice); 130 AudioTransportImpl(AudioDeviceModule* audioDevice);
132 ~AudioTransportImpl(); 131 ~AudioTransportImpl();
133 132
134 public: 133 public:
135 int32_t SetFilePlayout(bool enable, const char* fileName = NULL); 134 int32_t SetFilePlayout(bool enable, const char* fileName = NULL);
136 void SetFullDuplex(bool enable); 135 void SetFullDuplex(bool enable);
137 void SetSpeakerVolume(bool enable) 136 void SetSpeakerVolume(bool enable)
138 { 137 {
139 _speakerVolume = enable; 138 _speakerVolume = enable;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 230
232 rtc::scoped_ptr<ProcessThread> _processThread; 231 rtc::scoped_ptr<ProcessThread> _processThread;
233 AudioDeviceModule* _audioDevice; 232 AudioDeviceModule* _audioDevice;
234 AudioEventObserver* _audioEventObserver; 233 AudioEventObserver* _audioEventObserver;
235 AudioTransportImpl* _audioTransport; 234 AudioTransportImpl* _audioTransport;
236 }; 235 };
237 236
238 } // namespace webrtc 237 } // namespace webrtc
239 238
240 #endif // #ifndef WEBRTC_AUDIO_DEVICE_FUNC_TEST_MANAGER_H 239 #endif // #ifndef WEBRTC_AUDIO_DEVICE_FUNC_TEST_MANAGER_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698