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

Unified Diff: ppapi/cpp/audio_config.cc

Issue 9129007: Work on improving PpbAudioConfig:RecommendSampleFrameCount (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 10 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: ppapi/cpp/audio_config.cc
===================================================================
--- ppapi/cpp/audio_config.cc (revision 122585)
+++ ppapi/cpp/audio_config.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -36,13 +36,24 @@
}
// static
+PP_AudioSampleRate AudioConfig::RecommendSampleRate(Instance* instance) {
+ if (!has_interface<PPB_AudioConfig>())
+ return PP_AUDIOSAMPLERATE_NONE;
+ return get_interface<PPB_AudioConfig>()->
+ RecommendSampleRate(instance->pp_instance());
+}
+
+// static
uint32_t AudioConfig::RecommendSampleFrameCount(
+ Instance* instance,
PP_AudioSampleRate sample_rate,
uint32_t requested_sample_frame_count) {
if (!has_interface<PPB_AudioConfig>())
return 0;
return get_interface<PPB_AudioConfig>()->
- RecommendSampleFrameCount(sample_rate, requested_sample_frame_count);
+ RecommendSampleFrameCount(instance->pp_instance(),
+ sample_rate,
+ requested_sample_frame_count);
}
} // namespace pp

Powered by Google App Engine
This is Rietveld 408576698