diff options
author | nfullagar@google.com <nfullagar@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-18 01:10:19 +0000 |
---|---|---|
committer | nfullagar@google.com <nfullagar@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-18 01:10:19 +0000 |
commit | c59ed589fde8d4c9225b7b1b125286f842a42e56 (patch) | |
tree | fdaa00c2a9f51d0030e3b05bb289630ad5f2e211 /ppapi/examples | |
parent | 86bd8a2b5e1ce2965551271109be51244d2fcb42 (diff) | |
download | chromium_src-c59ed589fde8d4c9225b7b1b125286f842a42e56.zip chromium_src-c59ed589fde8d4c9225b7b1b125286f842a42e56.tar.gz chromium_src-c59ed589fde8d4c9225b7b1b125286f842a42e56.tar.bz2 |
Work on improving PpbAudioConfig:RecommendSampleFrameCount
Add version 1.1 which will query the audio back end for the best available
sample frame count. Also add RecommendSampleRate. Switch pepper plugin
delegate to use AUDIO_PCM_LOW_LATENCY if client request is compatible.
TEST=included
BUG=http://code.google.com/p/chromium/issues/detail?id=107572
Review URL: https://chromiumcodereview.appspot.com/9129007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122653 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/examples')
-rw-r--r-- | ppapi/examples/audio/audio.cc | 4 | ||||
-rw-r--r-- | ppapi/examples/audio_input/audio_input.cc | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/ppapi/examples/audio/audio.cc b/ppapi/examples/audio/audio.cc index 2c01faf..e6a0a84 100644 --- a/ppapi/examples/audio/audio.cc +++ b/ppapi/examples/audio/audio.cc @@ -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. @@ -56,7 +56,7 @@ class MyInstance : public pp::Instance { pp::AudioConfig config; sample_count_ = pp::AudioConfig::RecommendSampleFrameCount( - sample_rate_, kDefaultSampleCount); + this, sample_rate_, kDefaultSampleCount); config = pp::AudioConfig(this, sample_rate_, sample_count_); audio_ = pp::Audio(this, config, SineWaveCallbackTrampoline, this); return audio_.StartPlayback(); diff --git a/ppapi/examples/audio_input/audio_input.cc b/ppapi/examples/audio_input/audio_input.cc index 74bc08e..203718e 100644 --- a/ppapi/examples/audio_input/audio_input.cc +++ b/ppapi/examples/audio_input/audio_input.cc @@ -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. @@ -41,7 +41,8 @@ class MyInstance : public pp::Instance { const uint32_t kSampleCount = 1024; const uint32_t kChannelCount = 1; - sample_count_ = pp::AudioConfig::RecommendSampleFrameCount(kSampleFrequency, + sample_count_ = pp::AudioConfig::RecommendSampleFrameCount(this, + kSampleFrequency, kSampleCount); PP_DCHECK(sample_count_ > 0); channel_count_ = kChannelCount; |