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

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

Issue 9655018: Make AudioParameters a class instead of a struct (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests 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/audio_hardware.cc
diff --git a/content/renderer/media/audio_hardware.cc b/content/renderer/media/audio_hardware.cc
index 8fca8e55f98b7e789cfa7006611a1e33f7e96147..45674493cb3e1f6e1e693690bf5942f9a93b9a45 100644
--- a/content/renderer/media/audio_hardware.cc
+++ b/content/renderer/media/audio_hardware.cc
@@ -11,7 +11,7 @@
static double output_sample_rate = 0.0;
static double input_sample_rate = 0.0;
static size_t output_buffer_size = 0;
-static uint32 input_channel_count = 0;
+static ChannelLayout input_channel_layout = CHANNEL_LAYOUT_NONE;
namespace audio_hardware {
@@ -78,17 +78,17 @@ size_t GetHighLatencyOutputBufferSize(int sample_rate) {
return samples;
}
-uint32 GetInputChannelCount() {
+ChannelLayout GetInputChannelLayout() {
DCHECK(RenderThreadImpl::current() != NULL);
- if (!input_channel_count) {
- uint32 channels = 0;
+ if (input_channel_layout == CHANNEL_LAYOUT_NONE) {
+ ChannelLayout layout = CHANNEL_LAYOUT_NONE;
RenderThreadImpl::current()->Send(
- new ViewHostMsg_GetHardwareInputChannelCount(&channels));
- input_channel_count = channels;
+ new ViewHostMsg_GetHardwareInputChannelLayout(&layout));
+ input_channel_layout = layout;
}
- return input_channel_count;
+ return input_channel_layout;
}
void ResetCache() {
@@ -97,7 +97,7 @@ void ResetCache() {
output_sample_rate = 0.0;
input_sample_rate = 0.0;
output_buffer_size = 0;
- input_channel_count = 0;
+ input_channel_layout = CHANNEL_LAYOUT_NONE;
}
} // namespace audio_hardware

Powered by Google App Engine
This is Rietveld 408576698