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

Side by Side Diff: webrtc/modules/audio_mixer/audio_mixer.h

Issue 2302483002: Style changes in Audio Mixer (Closed)
Patch Set: Removed size_t everywhere in favor of int. Created 4 years, 3 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) 2011 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2011 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
11 #ifndef WEBRTC_MODULES_AUDIO_MIXER_AUDIO_MIXER_H_ 11 #ifndef WEBRTC_MODULES_AUDIO_MIXER_AUDIO_MIXER_H_
12 #define WEBRTC_MODULES_AUDIO_MIXER_AUDIO_MIXER_H_ 12 #define WEBRTC_MODULES_AUDIO_MIXER_AUDIO_MIXER_H_
13 13
14 #include <memory> 14 #include <memory>
15 15
16 #include "webrtc/modules/audio_mixer/audio_mixer_defines.h" 16 #include "webrtc/modules/audio_mixer/audio_mixer_defines.h"
17 #include "webrtc/modules/include/module.h" 17 #include "webrtc/modules/include/module.h"
18 #include "webrtc/modules/include/module_common_types.h" 18 #include "webrtc/modules/include/module_common_types.h"
19 19
20 namespace webrtc { 20 namespace webrtc {
21 class MixerAudioSource;
22 21
23 class AudioMixer { 22 class AudioMixer {
24 public: 23 public:
25 static const int kMaximumAmountOfMixedAudioSources = 3; 24 static const int kMaximumAmountOfMixedAudioSources = 3;
26 enum Frequency { 25 enum Frequency {
27 kNbInHz = 8000, 26 kNbInHz = 8000,
28 kWbInHz = 16000, 27 kWbInHz = 16000,
29 kSwbInHz = 32000, 28 kSwbInHz = 32000,
30 kFbInHz = 48000, 29 kFbInHz = 48000,
31 kDefaultFrequency = kWbInHz 30 kDefaultFrequency = kWbInHz
(...skipping 14 matching lines...) Expand all
46 // must have been added to the mixer (by calling SetMixabilityStatus()) 45 // must have been added to the mixer (by calling SetMixabilityStatus())
47 // before this function can be successfully called. 46 // before this function can be successfully called.
48 virtual int32_t SetAnonymousMixabilityStatus(MixerAudioSource* audio_source, 47 virtual int32_t SetAnonymousMixabilityStatus(MixerAudioSource* audio_source,
49 bool mixable) = 0; 48 bool mixable) = 0;
50 49
51 // Performs mixing by asking registered audio sources for audio. The 50 // Performs mixing by asking registered audio sources for audio. The
52 // mixed result is placed in the provided AudioFrame. Can only be 51 // mixed result is placed in the provided AudioFrame. Can only be
53 // called from a single thread. The rate and channels arguments 52 // called from a single thread. The rate and channels arguments
54 // specify the rate and number of channels of the mix result. 53 // specify the rate and number of channels of the mix result.
55 virtual void Mix(int sample_rate, 54 virtual void Mix(int sample_rate,
56 size_t number_of_channels, 55 int number_of_channels,
57 AudioFrame* audio_frame_for_mixing) = 0; 56 AudioFrame* audio_frame_for_mixing) = 0;
58 57
59 // Returns true if the audio source is mixed anonymously. 58 // Returns true if the audio source is mixed anonymously.
60 virtual bool AnonymousMixabilityStatus( 59 virtual bool AnonymousMixabilityStatus(
61 const MixerAudioSource& audio_source) const = 0; 60 const MixerAudioSource& audio_source) const = 0;
62 61
63 // Output level functions for VoEVolumeControl. Return value 62 // Output level functions for VoEVolumeControl. Return value
64 // between 0 and 9 is returned by voe::AudioLevel. 63 // between 0 and 9 is returned by voe::AudioLevel.
65 virtual int GetOutputAudioLevel() = 0; 64 virtual int GetOutputAudioLevel() = 0;
66 65
67 // Return value between 0 and 0x7fff is returned by voe::AudioLevel. 66 // Return value between 0 and 0x7fff is returned by voe::AudioLevel.
68 virtual int GetOutputAudioLevelFullRange() = 0; 67 virtual int GetOutputAudioLevelFullRange() = 0;
69 68
70 protected: 69 protected:
71 AudioMixer() {} 70 AudioMixer() {}
72 71
73 private: 72 private:
74 RTC_DISALLOW_COPY_AND_ASSIGN(AudioMixer); 73 RTC_DISALLOW_COPY_AND_ASSIGN(AudioMixer);
75 }; 74 };
76 } // namespace webrtc 75 } // namespace webrtc
77 76
78 #endif // WEBRTC_MODULES_AUDIO_MIXER_AUDIO_MIXER_H_ 77 #endif // WEBRTC_MODULES_AUDIO_MIXER_AUDIO_MIXER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698