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

Unified Diff: webrtc/modules/audio_processing/include/audio_processing.h

Issue 1338833002: Fix the maximum native sample rate in AudioProcessing (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix 44k1 sample rate 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 | « no previous file | webrtc/voice_engine/transmit_mixer.cc » ('j') | webrtc/voice_engine/utility.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_processing/include/audio_processing.h
diff --git a/webrtc/modules/audio_processing/include/audio_processing.h b/webrtc/modules/audio_processing/include/audio_processing.h
index 445d5c8c247886fbb8b7273ebc8ee48d9a433738..29484719c64fb24ed98e4941ec47cf2f74c699c7 100644
--- a/webrtc/modules/audio_processing/include/audio_processing.h
+++ b/webrtc/modules/audio_processing/include/audio_processing.h
@@ -15,6 +15,7 @@
#include <stdio.h> // FILE
#include <vector>
+#include "webrtc/base/arraysize.h"
#include "webrtc/base/platform_file.h"
#include "webrtc/common.h"
#include "webrtc/modules/audio_processing/beamformer/array_util.h"
@@ -128,8 +129,6 @@ struct Intelligibility {
bool enabled;
};
-static const int kAudioProcMaxNativeSampleRateHz = 32000;
-
// The Audio Processing Module (APM) provides a collection of voice processing
// components designed for real-time communications software.
//
@@ -474,6 +473,16 @@ class AudioProcessing {
static const int kChunkSizeMs = 10;
};
+static const int kAudioProcNativeSampleRatesHz[] = {
Andrew MacDonald 2015/09/16 02:35:08 nit: Make these class members: class AudioProcess
aluebs-webrtc 2015/09/16 03:02:53 I though about that, but there is no cc file. Is t
Andrew MacDonald 2015/09/16 04:04:08 You can use audio_processing_impl.cc.
aluebs-webrtc 2015/09/22 01:35:29 Good point. Done.
+ AudioProcessing::kSampleRate8kHz,
+ AudioProcessing::kSampleRate16kHz,
+ AudioProcessing::kSampleRate32kHz,
+ AudioProcessing::kSampleRate48kHz};
+static const size_t kNumAudioProcNativeSampleRates =
+ arraysize(kAudioProcNativeSampleRatesHz);
+static const int kAudioProcMaxNativeSampleRateHz =
+ kAudioProcNativeSampleRatesHz[kNumAudioProcNativeSampleRates - 1];
+
class StreamConfig {
public:
// sample_rate_hz: The sampling rate of the stream.
« no previous file with comments | « no previous file | webrtc/voice_engine/transmit_mixer.cc » ('j') | webrtc/voice_engine/utility.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698