| OLD | NEW | 
|---|
| 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 17 matching lines...) Expand all  Loading... | 
| 28                            const AudioFrame** uniqueAudioFrames, | 28                            const AudioFrame** uniqueAudioFrames, | 
| 29                            uint32_t size) | 29                            uint32_t size) | 
| 30 { | 30 { | 
| 31     WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,-1), | 31     WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,-1), | 
| 32                  "OutputMixer::NewMixedAudio(id=%d, size=%u)", id, size); | 32                  "OutputMixer::NewMixedAudio(id=%d, size=%u)", id, size); | 
| 33 | 33 | 
| 34     _audioFrame.CopyFrom(generalAudioFrame); | 34     _audioFrame.CopyFrom(generalAudioFrame); | 
| 35     _audioFrame.id_ = id; | 35     _audioFrame.id_ = id; | 
| 36 } | 36 } | 
| 37 | 37 | 
| 38 void OutputMixer::MixedParticipants( |  | 
| 39     int32_t id, |  | 
| 40     const ParticipantStatistics* participantStatistics, |  | 
| 41     uint32_t size) |  | 
| 42 { |  | 
| 43     WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,-1), |  | 
| 44                  "OutputMixer::MixedParticipants(id=%d, size=%u)", id, size); |  | 
| 45 } |  | 
| 46 |  | 
| 47 void OutputMixer::VADPositiveParticipants(int32_t id, |  | 
| 48     const ParticipantStatistics* participantStatistics, uint32_t size) |  | 
| 49 { |  | 
| 50     WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,-1), |  | 
| 51                  "OutputMixer::VADPositiveParticipants(id=%d, size=%u)", |  | 
| 52                  id, size); |  | 
| 53 } |  | 
| 54 |  | 
| 55 void OutputMixer::MixedAudioLevel(int32_t id, uint32_t level) |  | 
| 56 { |  | 
| 57     WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,-1), |  | 
| 58                  "OutputMixer::MixedAudioLevel(id=%d, level=%u)", id, level); |  | 
| 59 } |  | 
| 60 |  | 
| 61 void OutputMixer::PlayNotification(int32_t id, uint32_t durationMs) | 38 void OutputMixer::PlayNotification(int32_t id, uint32_t durationMs) | 
| 62 { | 39 { | 
| 63     WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,-1), | 40     WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,-1), | 
| 64                  "OutputMixer::PlayNotification(id=%d, durationMs=%d)", | 41                  "OutputMixer::PlayNotification(id=%d, durationMs=%d)", | 
| 65                  id, durationMs); | 42                  id, durationMs); | 
| 66     // Not implement yet | 43     // Not implement yet | 
| 67 } | 44 } | 
| 68 | 45 | 
| 69 void OutputMixer::RecordNotification(int32_t id, | 46 void OutputMixer::RecordNotification(int32_t id, | 
| 70                                      uint32_t durationMs) | 47                                      uint32_t durationMs) | 
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 124     _externalMedia(false), | 101     _externalMedia(false), | 
| 125     _panLeft(1.0f), | 102     _panLeft(1.0f), | 
| 126     _panRight(1.0f), | 103     _panRight(1.0f), | 
| 127     _mixingFrequencyHz(8000), | 104     _mixingFrequencyHz(8000), | 
| 128     _outputFileRecorderPtr(NULL), | 105     _outputFileRecorderPtr(NULL), | 
| 129     _outputFileRecording(false) | 106     _outputFileRecording(false) | 
| 130 { | 107 { | 
| 131     WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(_instanceId,-1), | 108     WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(_instanceId,-1), | 
| 132                  "OutputMixer::OutputMixer() - ctor"); | 109                  "OutputMixer::OutputMixer() - ctor"); | 
| 133 | 110 | 
| 134     if ((_mixerModule.RegisterMixedStreamCallback(*this) == -1) || | 111     if (_mixerModule.RegisterMixedStreamCallback(*this) == -1) | 
| 135         (_mixerModule.RegisterMixerStatusCallback(*this, 100) == -1)) |  | 
| 136     { | 112     { | 
| 137         WEBRTC_TRACE(kTraceError, kTraceVoice, VoEId(_instanceId,-1), | 113         WEBRTC_TRACE(kTraceError, kTraceVoice, VoEId(_instanceId,-1), | 
| 138                      "OutputMixer::OutputMixer() failed to register mixer" | 114                      "OutputMixer::OutputMixer() failed to register mixer" | 
| 139                      "callbacks"); | 115                      "callbacks"); | 
| 140     } | 116     } | 
| 141 | 117 | 
| 142     _dtmfGenerator.Init(); | 118     _dtmfGenerator.Init(); | 
| 143 } | 119 } | 
| 144 | 120 | 
| 145 void | 121 void | 
| (...skipping 17 matching lines...) Expand all  Loading... | 
| 163     { | 139     { | 
| 164         CriticalSectionScoped cs(&_fileCritSect); | 140         CriticalSectionScoped cs(&_fileCritSect); | 
| 165         if (_outputFileRecorderPtr) | 141         if (_outputFileRecorderPtr) | 
| 166         { | 142         { | 
| 167             _outputFileRecorderPtr->RegisterModuleFileCallback(NULL); | 143             _outputFileRecorderPtr->RegisterModuleFileCallback(NULL); | 
| 168             _outputFileRecorderPtr->StopRecording(); | 144             _outputFileRecorderPtr->StopRecording(); | 
| 169             FileRecorder::DestroyFileRecorder(_outputFileRecorderPtr); | 145             FileRecorder::DestroyFileRecorder(_outputFileRecorderPtr); | 
| 170             _outputFileRecorderPtr = NULL; | 146             _outputFileRecorderPtr = NULL; | 
| 171         } | 147         } | 
| 172     } | 148     } | 
| 173     _mixerModule.UnRegisterMixerStatusCallback(); |  | 
| 174     _mixerModule.UnRegisterMixedStreamCallback(); | 149     _mixerModule.UnRegisterMixedStreamCallback(); | 
| 175     delete &_mixerModule; | 150     delete &_mixerModule; | 
| 176     delete &_callbackCritSect; | 151     delete &_callbackCritSect; | 
| 177     delete &_fileCritSect; | 152     delete &_fileCritSect; | 
| 178 } | 153 } | 
| 179 | 154 | 
| 180 int32_t | 155 int32_t | 
| 181 OutputMixer::SetEngineInformation(voe::Statistics& engineStatistics) | 156 OutputMixer::SetEngineInformation(voe::Statistics& engineStatistics) | 
| 182 { | 157 { | 
| 183     WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,-1), | 158     WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,-1), | 
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 627             _audioFrame.data_[2 * i + 1] = 0; | 602             _audioFrame.data_[2 * i + 1] = 0; | 
| 628         } | 603         } | 
| 629     } | 604     } | 
| 630     assert(_audioFrame.samples_per_channel_ == toneSamples); | 605     assert(_audioFrame.samples_per_channel_ == toneSamples); | 
| 631 | 606 | 
| 632     return 0; | 607     return 0; | 
| 633 } | 608 } | 
| 634 | 609 | 
| 635 }  // namespace voe | 610 }  // namespace voe | 
| 636 }  // namespace webrtc | 611 }  // namespace webrtc | 
| OLD | NEW | 
|---|