aboutsummaryrefslogtreecommitdiff
path: root/webrtc/voice_engine/voe_base_impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'webrtc/voice_engine/voe_base_impl.h')
-rw-r--r--webrtc/voice_engine/voe_base_impl.h79
1 files changed, 47 insertions, 32 deletions
diff --git a/webrtc/voice_engine/voe_base_impl.h b/webrtc/voice_engine/voe_base_impl.h
index f0ac959dcd..58e0387423 100644
--- a/webrtc/voice_engine/voe_base_impl.h
+++ b/webrtc/voice_engine/voe_base_impl.h
@@ -13,7 +13,7 @@
#include "webrtc/voice_engine/include/voe_base.h"
-#include "webrtc/modules/interface/module_common_types.h"
+#include "webrtc/modules/include/module_common_types.h"
#include "webrtc/voice_engine/shared_data.h"
namespace webrtc {
@@ -54,37 +54,57 @@ class VoEBaseImpl : public VoEBase,
int AssociateSendChannel(int channel, int accociate_send_channel) override;
// AudioTransport
- int32_t RecordedDataIsAvailable(const void* audioSamples, size_t nSamples,
- size_t nBytesPerSample, uint8_t nChannels,
- uint32_t samplesPerSec, uint32_t totalDelayMS,
- int32_t clockDrift, uint32_t micLevel,
- bool keyPressed,
+ int32_t RecordedDataIsAvailable(const void* audioSamples,
+ const size_t nSamples,
+ const size_t nBytesPerSample,
+ const size_t nChannels,
+ const uint32_t samplesPerSec,
+ const uint32_t totalDelayMS,
+ const int32_t clockDrift,
+ const uint32_t currentMicLevel,
+ const bool keyPressed,
uint32_t& newMicLevel) override;
- int32_t NeedMorePlayData(size_t nSamples, size_t nBytesPerSample,
- uint8_t nChannels, uint32_t samplesPerSec,
- void* audioSamples, size_t& nSamplesOut,
+ int32_t NeedMorePlayData(const size_t nSamples,
+ const size_t nBytesPerSample,
+ const size_t nChannels,
+ const uint32_t samplesPerSec,
+ void* audioSamples,
+ size_t& nSamplesOut,
int64_t* elapsed_time_ms,
int64_t* ntp_time_ms) override;
- int OnDataAvailable(const int voe_channels[], int number_of_voe_channels,
- const int16_t* audio_data, int sample_rate,
- int number_of_channels, size_t number_of_frames,
- int audio_delay_milliseconds, int volume,
- bool key_pressed, bool need_audio_processing) override;
- void OnData(int voe_channel, const void* audio_data, int bits_per_sample,
- int sample_rate, int number_of_channels,
+ int OnDataAvailable(const int voe_channels[],
+ size_t number_of_voe_channels,
+ const int16_t* audio_data,
+ int sample_rate,
+ size_t number_of_channels,
+ size_t number_of_frames,
+ int audio_delay_milliseconds,
+ int current_volume,
+ bool key_pressed,
+ bool need_audio_processing) override;
+ void OnData(int voe_channel,
+ const void* audio_data,
+ int bits_per_sample,
+ int sample_rate,
+ size_t number_of_channels,
size_t number_of_frames) override;
- void PushCaptureData(int voe_channel, const void* audio_data,
- int bits_per_sample, int sample_rate,
- int number_of_channels,
+ void PushCaptureData(int voe_channel,
+ const void* audio_data,
+ int bits_per_sample,
+ int sample_rate,
+ size_t number_of_channels,
size_t number_of_frames) override;
- void PullRenderData(int bits_per_sample, int sample_rate,
- int number_of_channels, size_t number_of_frames,
- void* audio_data, int64_t* elapsed_time_ms,
+ void PullRenderData(int bits_per_sample,
+ int sample_rate,
+ size_t number_of_channels,
+ size_t number_of_frames,
+ void* audio_data,
+ int64_t* elapsed_time_ms,
int64_t* ntp_time_ms) override;
// AudioDeviceObserver
- void OnErrorIsReported(ErrorCode error) override;
- void OnWarningIsReported(WarningCode warning) override;
+ void OnErrorIsReported(const ErrorCode error) override;
+ void OnWarningIsReported(const WarningCode warning) override;
protected:
VoEBaseImpl(voe::SharedData* shared);
@@ -104,24 +124,19 @@ class VoEBaseImpl : public VoEBase,
// It returns new AGC microphone volume or 0 if no volume changes
// should be done.
int ProcessRecordedDataWithAPM(
- const int voe_channels[], int number_of_voe_channels,
- const void* audio_data, uint32_t sample_rate, uint8_t number_of_channels,
+ const int voe_channels[], size_t number_of_voe_channels,
+ const void* audio_data, uint32_t sample_rate, size_t number_of_channels,
size_t number_of_frames, uint32_t audio_delay_milliseconds,
int32_t clock_drift, uint32_t volume, bool key_pressed);
- void GetPlayoutData(int sample_rate, int number_of_channels,
+ void GetPlayoutData(int sample_rate, size_t number_of_channels,
size_t number_of_frames, bool feed_data_to_apm,
void* audio_data, int64_t* elapsed_time_ms,
int64_t* ntp_time_ms);
- int32_t AddVoEVersion(char* str) const;
-
// Initialize channel by setting Engine Information then initializing
// channel.
int InitializeChannel(voe::ChannelOwner* channel_owner);
-#ifdef WEBRTC_EXTERNAL_TRANSPORT
- int32_t AddExternalTransportBuild(char* str) const;
-#endif
VoiceEngineObserver* voiceEngineObserverPtr_;
CriticalSectionWrapper& callbackCritSect_;