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

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

Issue 2238803002: Changed folder structure in new mixer and fixed simple lint errors. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Small changes in response to comments. Created 4 years, 4 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
(Empty)
1 /*
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #ifndef WEBRTC_MODULES_AUDIO_MIXER_INCLUDE_NEW_AUDIO_CONFERENCE_MIXER_H_
12 #define WEBRTC_MODULES_AUDIO_MIXER_INCLUDE_NEW_AUDIO_CONFERENCE_MIXER_H_
13
14 #include "webrtc/modules/audio_mixer/include/audio_mixer_defines.h"
15 #include "webrtc/modules/include/module.h"
16 #include "webrtc/modules/include/module_common_types.h"
17
18 namespace webrtc {
19 class MixerAudioSource;
20
21 class NewAudioConferenceMixer {
22 public:
23 enum { kMaximumAmountOfMixedAudioSources = 3 };
24 enum Frequency {
25 kNbInHz = 8000,
26 kWbInHz = 16000,
27 kSwbInHz = 32000,
28 kFbInHz = 48000,
29 kLowestPossible = -1,
30 kDefaultFrequency = kWbInHz
31 };
32
33 // Factory method. Constructor disabled.
34 static NewAudioConferenceMixer* Create(int id);
35 virtual ~NewAudioConferenceMixer() {}
36
37 // Add/remove audio sources as candidates for mixing.
38 virtual int32_t SetMixabilityStatus(MixerAudioSource* audio_source,
39 bool mixable) = 0;
40 // Returns true if an audio source is a candidate for mixing.
41 virtual bool MixabilityStatus(const MixerAudioSource& audio_source) const = 0;
42
43 // Inform the mixer that the audio source should always be mixed and not
44 // count toward the number of mixed audio sources. Note that an audio source
45 // must have been added to the mixer (by calling SetMixabilityStatus())
46 // before this function can be successfully called.
47 virtual int32_t SetAnonymousMixabilityStatus(MixerAudioSource* audio_source,
48 bool mixable) = 0;
49
50 // Performs mixing by asking registered audio sources for audio. The
51 // mixed result is placed in the provided AudioFrame. Can only be
52 // called from a single thread. The rate and channels arguments
53 // specify the rate and number of channels of the mix result.
54 virtual void Mix(int sample_rate,
55 size_t number_of_channels,
56 AudioFrame* audio_frame_for_mixing) = 0;
57
58 // Returns true if the audio source is mixed anonymously.
59 virtual bool AnonymousMixabilityStatus(
60 const MixerAudioSource& audio_source) const = 0;
61
62 protected:
63 NewAudioConferenceMixer() {}
64 };
65 } // namespace webrtc
66
67 #endif // WEBRTC_MODULES_AUDIO_MIXER_INCLUDE_NEW_AUDIO_CONFERENCE_MIXER_H_
OLDNEW
« no previous file with comments | « webrtc/modules/audio_mixer/include/audio_mixer_defines.h ('k') | webrtc/modules/audio_mixer/new_audio_conference_mixer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698