OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2010 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 : public webrtc::VoEAudioProcessing, | 122 : public webrtc::VoEAudioProcessing, |
123 public webrtc::VoEBase, public webrtc::VoECodec, | 123 public webrtc::VoEBase, public webrtc::VoECodec, |
124 public webrtc::VoEHardware, public webrtc::VoERTP_RTCP, | 124 public webrtc::VoEHardware, public webrtc::VoERTP_RTCP, |
125 public webrtc::VoEVolumeControl { | 125 public webrtc::VoEVolumeControl { |
126 public: | 126 public: |
127 struct Channel { | 127 struct Channel { |
128 Channel() { | 128 Channel() { |
129 memset(&send_codec, 0, sizeof(send_codec)); | 129 memset(&send_codec, 0, sizeof(send_codec)); |
130 } | 130 } |
131 bool playout = false; | 131 bool playout = false; |
132 float volume_scale = 1.0f; | |
133 bool vad = false; | 132 bool vad = false; |
134 bool codec_fec = false; | 133 bool codec_fec = false; |
135 int max_encoding_bandwidth = 0; | 134 int max_encoding_bandwidth = 0; |
136 bool opus_dtx = false; | 135 bool opus_dtx = false; |
137 bool nack = false; | 136 bool nack = false; |
138 int cn8_type = 13; | 137 int cn8_type = 13; |
139 int cn16_type = 105; | 138 int cn16_type = 105; |
140 int nack_max_packets = 0; | 139 int nack_max_packets = 0; |
141 uint32_t send_ssrc = 0; | 140 uint32_t send_ssrc = 0; |
142 int associate_send_channel = -1; | 141 int associate_send_channel = -1; |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 WEBRTC_STUB(SetSpeakerVolume, (unsigned int)); | 487 WEBRTC_STUB(SetSpeakerVolume, (unsigned int)); |
489 WEBRTC_STUB(GetSpeakerVolume, (unsigned int&)); | 488 WEBRTC_STUB(GetSpeakerVolume, (unsigned int&)); |
490 WEBRTC_STUB(SetMicVolume, (unsigned int)); | 489 WEBRTC_STUB(SetMicVolume, (unsigned int)); |
491 WEBRTC_STUB(GetMicVolume, (unsigned int&)); | 490 WEBRTC_STUB(GetMicVolume, (unsigned int&)); |
492 WEBRTC_STUB(SetInputMute, (int, bool)); | 491 WEBRTC_STUB(SetInputMute, (int, bool)); |
493 WEBRTC_STUB(GetInputMute, (int, bool&)); | 492 WEBRTC_STUB(GetInputMute, (int, bool&)); |
494 WEBRTC_STUB(GetSpeechInputLevel, (unsigned int&)); | 493 WEBRTC_STUB(GetSpeechInputLevel, (unsigned int&)); |
495 WEBRTC_STUB(GetSpeechOutputLevel, (int, unsigned int&)); | 494 WEBRTC_STUB(GetSpeechOutputLevel, (int, unsigned int&)); |
496 WEBRTC_STUB(GetSpeechInputLevelFullRange, (unsigned int&)); | 495 WEBRTC_STUB(GetSpeechInputLevelFullRange, (unsigned int&)); |
497 WEBRTC_STUB(GetSpeechOutputLevelFullRange, (int, unsigned int&)); | 496 WEBRTC_STUB(GetSpeechOutputLevelFullRange, (int, unsigned int&)); |
498 WEBRTC_FUNC(SetChannelOutputVolumeScaling, (int channel, float scale)) { | 497 WEBRTC_STUB(SetChannelOutputVolumeScaling, (int channel, float scale)); |
499 WEBRTC_CHECK_CHANNEL(channel); | 498 WEBRTC_STUB(GetChannelOutputVolumeScaling, (int channel, float& scale)); |
500 channels_[channel]->volume_scale= scale; | |
501 return 0; | |
502 } | |
503 WEBRTC_FUNC(GetChannelOutputVolumeScaling, (int channel, float& scale)) { | |
504 WEBRTC_CHECK_CHANNEL(channel); | |
505 scale = channels_[channel]->volume_scale; | |
506 return 0; | |
507 } | |
508 WEBRTC_STUB(SetOutputVolumePan, (int channel, float left, float right)); | 499 WEBRTC_STUB(SetOutputVolumePan, (int channel, float left, float right)); |
509 WEBRTC_STUB(GetOutputVolumePan, (int channel, float& left, float& right)); | 500 WEBRTC_STUB(GetOutputVolumePan, (int channel, float& left, float& right)); |
510 | 501 |
511 // webrtc::VoEAudioProcessing | 502 // webrtc::VoEAudioProcessing |
512 WEBRTC_FUNC(SetNsStatus, (bool enable, webrtc::NsModes mode)) { | 503 WEBRTC_FUNC(SetNsStatus, (bool enable, webrtc::NsModes mode)) { |
513 ns_enabled_ = enable; | 504 ns_enabled_ = enable; |
514 ns_mode_ = mode; | 505 ns_mode_ = mode; |
515 return 0; | 506 return 0; |
516 } | 507 } |
517 WEBRTC_FUNC(GetNsStatus, (bool& enabled, webrtc::NsModes& mode)) { | 508 WEBRTC_FUNC(GetNsStatus, (bool& enabled, webrtc::NsModes& mode)) { |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 webrtc::NsModes ns_mode_ = webrtc::kNsDefault; | 638 webrtc::NsModes ns_mode_ = webrtc::kNsDefault; |
648 webrtc::AgcModes agc_mode_ = webrtc::kAgcDefault; | 639 webrtc::AgcModes agc_mode_ = webrtc::kAgcDefault; |
649 webrtc::AgcConfig agc_config_; | 640 webrtc::AgcConfig agc_config_; |
650 int playout_fail_channel_ = -1; | 641 int playout_fail_channel_ = -1; |
651 FakeAudioProcessing audio_processing_; | 642 FakeAudioProcessing audio_processing_; |
652 }; | 643 }; |
653 | 644 |
654 } // namespace cricket | 645 } // namespace cricket |
655 | 646 |
656 #endif // WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVOICEENGINE_H_ | 647 #endif // WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVOICEENGINE_H_ |
OLD | NEW |