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

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

Issue 2111293003: Removed callback between old AudioConferenceMixer and OutputMixer. The audio frame with mixed audio… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@new_mixer_format
Patch Set: Removed asserts, decreased lock holding time & minor changes. 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
OLDNEW
(Empty)
1 /*
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
ivoc 2016/07/07 13:46:16 Still missing some 2016's. Or will this be removed
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 : public Module {
22 public:
23 enum { kMaximumAmountOfMixedParticipants = 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 // Module functions
38 int64_t TimeUntilNextProcess() override = 0;
39 void Process() override = 0;
40
41 // Add/remove participants as candidates for mixing.
42 virtual int32_t SetMixabilityStatus(MixerAudioSource* participant,
43 bool mixable) = 0;
44 // Returns true if a participant is a candidate for mixing.
45 virtual bool MixabilityStatus(const MixerAudioSource& participant) const = 0;
46
47 // Inform the mixer that the participant should always be mixed and not
48 // count toward the number of mixed participants. Note that a participant
49 // must have been added to the mixer (by calling SetMixabilityStatus())
50 // before this function can be successfully called.
51 virtual int32_t SetAnonymousMixabilityStatus(MixerAudioSource* participant,
52 bool mixable) = 0;
53 // Returns true if the participant is mixed anonymously.
54 virtual bool AnonymousMixabilityStatus(
55 const MixerAudioSource& participant) const = 0;
56
57 // Performs mixing by asking registered participants for audio.
58 // The mixed result is placed in the provided AudioFrame.
59 virtual void Mix(AudioFrame* audio_frame_for_mixing) = 0;
60
61 // Set the minimum sampling frequency at which to mix. The mixing algorithm
62 // may still choose to mix at a higher samling frequency to avoid
63 // downsampling of audio contributing to the mixed audio.
64 virtual int32_t SetMinimumMixingFrequency(Frequency freq) = 0;
65
66 protected:
67 NewAudioConferenceMixer() {}
68 };
69 } // namespace webrtc
70
71 #endif // WEBRTC_MODULES_AUDIO_MIXER_INCLUDE_NEW_AUDIO_CONFERENCE_MIXER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698