| OLD | NEW |
| (Empty) |
| 1 /* | |
| 2 * Copyright (c) 2012 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 VOICE_ENGINE_OUTPUT_MIXER_H_ | |
| 12 #define VOICE_ENGINE_OUTPUT_MIXER_H_ | |
| 13 | |
| 14 #include <memory> | |
| 15 | |
| 16 #include "common_audio/resampler/include/push_resampler.h" | |
| 17 #include "common_types.h" // NOLINT(build/include) | |
| 18 #include "modules/audio_conference_mixer/include/audio_conference_mixer.h" | |
| 19 #include "modules/audio_conference_mixer/include/audio_conference_mixer_defines.
h" | |
| 20 #include "rtc_base/criticalsection.h" | |
| 21 | |
| 22 namespace webrtc { | |
| 23 | |
| 24 class AudioProcessing; | |
| 25 class FileWrapper; | |
| 26 | |
| 27 namespace voe { | |
| 28 | |
| 29 class Statistics; | |
| 30 | |
| 31 class OutputMixer : public AudioMixerOutputReceiver | |
| 32 { | |
| 33 public: | |
| 34 static int32_t Create(OutputMixer*& mixer, uint32_t instanceId); | |
| 35 | |
| 36 static void Destroy(OutputMixer*& mixer); | |
| 37 | |
| 38 int32_t SetEngineInformation(Statistics& engineStatistics); | |
| 39 | |
| 40 int32_t SetAudioProcessingModule( | |
| 41 AudioProcessing* audioProcessingModule); | |
| 42 | |
| 43 int32_t MixActiveChannels(); | |
| 44 | |
| 45 int32_t DoOperationsOnCombinedSignal(bool feed_data_to_apm); | |
| 46 | |
| 47 int32_t SetMixabilityStatus(MixerParticipant& participant, | |
| 48 bool mixable); | |
| 49 | |
| 50 int GetMixedAudio(int sample_rate_hz, size_t num_channels, | |
| 51 AudioFrame* audioFrame); | |
| 52 | |
| 53 virtual ~OutputMixer(); | |
| 54 | |
| 55 // from AudioMixerOutputReceiver | |
| 56 virtual void NewMixedAudio( | |
| 57 int32_t id, | |
| 58 const AudioFrame& generalAudioFrame, | |
| 59 const AudioFrame** uniqueAudioFrames, | |
| 60 uint32_t size); | |
| 61 | |
| 62 private: | |
| 63 OutputMixer(uint32_t instanceId); | |
| 64 | |
| 65 // uses | |
| 66 Statistics* _engineStatisticsPtr; | |
| 67 AudioProcessing* _audioProcessingModulePtr; | |
| 68 | |
| 69 AudioConferenceMixer& _mixerModule; | |
| 70 AudioFrame _audioFrame; | |
| 71 // Converts mixed audio to the audio device output rate. | |
| 72 PushResampler<int16_t> resampler_; | |
| 73 // Converts mixed audio to the audio processing rate. | |
| 74 PushResampler<int16_t> audioproc_resampler_; | |
| 75 int _instanceId; | |
| 76 int _mixingFrequencyHz; | |
| 77 }; | |
| 78 | |
| 79 } // namespace voe | |
| 80 | |
| 81 } // namespace werbtc | |
| 82 | |
| 83 #endif // VOICE_ENGINE_OUTPUT_MIXER_H_ | |
| OLD | NEW |