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

Unified Diff: webrtc/voice_engine/utility.h

Issue 1338833002: Fix the maximum native sample rate in AudioProcessing (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Format Created 5 years, 3 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
« no previous file with comments | « webrtc/voice_engine/transmit_mixer.cc ('k') | webrtc/voice_engine/utility.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/voice_engine/utility.h
diff --git a/webrtc/voice_engine/utility.h b/webrtc/voice_engine/utility.h
index 87003c42581cd99337e3176fb3b1c2c772d438bc..cc44533665f6d811fa9934e0427d47c9beee142a 100644
--- a/webrtc/voice_engine/utility.h
+++ b/webrtc/voice_engine/utility.h
@@ -24,32 +24,26 @@ class AudioFrame;
namespace voe {
-// Upmix or downmix and resample the audio in |src_frame| to |dst_frame|.
-// Expects |dst_frame| to have its sample rate and channels members set to the
-// desired values. Updates the samples per channel member accordingly. No other
-// members will be changed.
+// Upmix or downmix and resample the audio to |dst_frame|. Expects |dst_frame|
+// to have its sample rate and channels members set to the desired values.
+// Updates the |samples_per_channel_| member accordingly.
+//
+// This version has an AudioFrame |src_frame| as input and sets the output
+// |timestamp_|, |elapsed_time_ms_| and |ntp_time_ms_| members equals to the
+// input ones.
void RemixAndResample(const AudioFrame& src_frame,
PushResampler<int16_t>* resampler,
AudioFrame* dst_frame);
-// Downmix and downsample the audio in |src_data| to |dst_af| as necessary,
-// specified by |codec_num_channels| and |codec_rate_hz|. |mono_buffer| is
-// temporary space and must be of sufficient size to hold the downmixed source
-// audio (recommend using a size of kMaxMonoDataSizeSamples).
-//
-// |dst_af| will have its data and format members (sample rate, channels and
-// samples per channel) set appropriately. No other members will be changed.
-// TODO(ajm): For now, this still calls Reset() on |dst_af|. Remove this, as
-// it shouldn't be needed.
-void DownConvertToCodecFormat(const int16_t* src_data,
- size_t samples_per_channel,
- int num_channels,
- int sample_rate_hz,
- int codec_num_channels,
- int codec_rate_hz,
- int16_t* mono_buffer,
- PushResampler<int16_t>* resampler,
- AudioFrame* dst_af);
+// This version has a pointer to the samples |src_data| as input and receives
+// |samples_per_channel|, |num_channels| and |sample_rate_hz| of the data as
+// parameters.
+void RemixAndResample(const int16_t* src_data,
+ size_t samples_per_channel,
+ int num_channels,
+ int sample_rate_hz,
+ PushResampler<int16_t>* resampler,
+ AudioFrame* dst_frame);
void MixWithSat(int16_t target[],
int target_channel,
« no previous file with comments | « webrtc/voice_engine/transmit_mixer.cc ('k') | webrtc/voice_engine/utility.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698