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

Unified Diff: content/renderer/media/webrtc_audio_device_impl.cc

Issue 9826023: Merge AudioRendererImpl and AudioRendererBase; add NullAudioSink (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/webrtc_audio_device_impl.cc
diff --git a/content/renderer/media/webrtc_audio_device_impl.cc b/content/renderer/media/webrtc_audio_device_impl.cc
index d37d0cf1156b9cfeb3ccd4c99599b4a763714ac7..4f1eb34c687fc56126eac9488785c097c5ec5c84 100644
--- a/content/renderer/media/webrtc_audio_device_impl.cc
+++ b/content/renderer/media/webrtc_audio_device_impl.cc
@@ -70,10 +70,10 @@ int32_t WebRtcAudioDeviceImpl::Release() {
return ret;
}
-size_t WebRtcAudioDeviceImpl::Render(
+int WebRtcAudioDeviceImpl::Render(
const std::vector<float*>& audio_data,
- size_t number_of_frames,
- size_t audio_delay_milliseconds) {
+ int number_of_frames,
+ int audio_delay_milliseconds) {
DCHECK_LE(number_of_frames, output_buffer_size());
{
@@ -90,12 +90,12 @@ size_t WebRtcAudioDeviceImpl::Render(
// Even if the hardware runs at 44.1kHz, we use 44.0 internally.
samples_per_sec = 44000;
}
- uint32_t samples_per_10_msec = (samples_per_sec / 100);
+ int samples_per_10_msec = (samples_per_sec / 100);
const int bytes_per_10_msec =
channels * samples_per_10_msec * bytes_per_sample_;
uint32_t num_audio_samples = 0;
- size_t accumulated_audio_samples = 0;
+ int accumulated_audio_samples = 0;
char* audio_byte_buffer = reinterpret_cast<char*>(output_buffer_.get());
@@ -136,8 +136,8 @@ void WebRtcAudioDeviceImpl::OnRenderError() {
void WebRtcAudioDeviceImpl::Capture(
const std::vector<float*>& audio_data,
- size_t number_of_frames,
- size_t audio_delay_milliseconds) {
+ int number_of_frames,
+ int audio_delay_milliseconds) {
DCHECK_LE(number_of_frames, input_buffer_size());
int output_delay_ms = 0;
@@ -166,7 +166,7 @@ void WebRtcAudioDeviceImpl::Capture(
const int samples_per_10_msec = (samples_per_sec / 100);
const int bytes_per_10_msec =
channels * samples_per_10_msec * bytes_per_sample_;
- size_t accumulated_audio_samples = 0;
+ int accumulated_audio_samples = 0;
char* audio_byte_buffer = reinterpret_cast<char*>(input_buffer_.get());
@@ -333,8 +333,8 @@ int32_t WebRtcAudioDeviceImpl::Init() {
ChannelLayout out_channel_layout = CHANNEL_LAYOUT_MONO;
AudioParameters::Format in_format = AudioParameters::AUDIO_PCM_LINEAR;
- size_t in_buffer_size = 0;
- size_t out_buffer_size = 0;
+ int in_buffer_size = 0;
+ int out_buffer_size = 0;
// TODO(henrika): factor out all platform specific parts in separate
// functions. Code is a bit messy right now.

Powered by Google App Engine
This is Rietveld 408576698