diff options
author | dalecurtis@chromium.org <dalecurtis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-05 13:39:21 +0000 |
---|---|---|
committer | dalecurtis@chromium.org <dalecurtis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-05 13:39:21 +0000 |
commit | dfc48e4ce465db7e44e7cb7a4d2628958e1787a0 (patch) | |
tree | d387f8da52225eb08fe29d6bc17808d04739b26c /webkit/plugins | |
parent | 42e66e5f9dc55b57bfc95f8a49836fba59ad0cba (diff) | |
download | chromium_src-dfc48e4ce465db7e44e7cb7a4d2628958e1787a0.zip chromium_src-dfc48e4ce465db7e44e7cb7a4d2628958e1787a0.tar.gz chromium_src-dfc48e4ce465db7e44e7cb7a4d2628958e1787a0.tar.bz2 |
Switch OnMoreData() to use AudioBus.
As titled, with this change we're now piping float data around the pipeline from
end to end. This change is in preparation for browser side channel remixing and
resampling.
As a consequence of this change the shared memory now represents the
contents of an AudioBus object, which is essentially audio data in a float
planar format.
BUG=114700
TEST=Should be no audible change. Ran all existing tests. Compiled ran
WebAudio/HTML5/WebRTC on all platforms and PPAPI on Linux.
Review URL: https://chromiumcodereview.appspot.com/10832285
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154951 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins')
-rw-r--r-- | webkit/plugins/ppapi/ppb_audio_impl.cc | 6 | ||||
-rw-r--r-- | webkit/plugins/ppapi/ppb_audio_impl.h | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/webkit/plugins/ppapi/ppb_audio_impl.cc b/webkit/plugins/ppapi/ppb_audio_impl.cc index 96504aa..aea9005 100644 --- a/webkit/plugins/ppapi/ppb_audio_impl.cc +++ b/webkit/plugins/ppapi/ppb_audio_impl.cc @@ -30,7 +30,8 @@ namespace ppapi { PPB_Audio_Impl::PPB_Audio_Impl(PP_Instance instance) : Resource(::ppapi::OBJECT_IS_IMPL, instance), - audio_(NULL) { + audio_(NULL), + sample_frame_count_(0) { } PPB_Audio_Impl::~PPB_Audio_Impl() { @@ -81,6 +82,7 @@ bool PPB_Audio_Impl::Init(PP_Resource config, audio_ = plugin_delegate->CreateAudioOutput( enter.object()->GetSampleRate(), enter.object()->GetSampleFrameCount(), this); + sample_frame_count_ = enter.object()->GetSampleFrameCount(); return audio_ != NULL; } @@ -153,7 +155,7 @@ void PPB_Audio_Impl::OnSetStreamInfo( size_t shared_memory_size, base::SyncSocket::Handle socket_handle) { SetStreamInfo(pp_instance(), shared_memory_handle, shared_memory_size, - socket_handle); + socket_handle, sample_frame_count_); } } // namespace ppapi diff --git a/webkit/plugins/ppapi/ppb_audio_impl.h b/webkit/plugins/ppapi/ppb_audio_impl.h index be41e36..9f9c35b 100644 --- a/webkit/plugins/ppapi/ppb_audio_impl.h +++ b/webkit/plugins/ppapi/ppb_audio_impl.h @@ -76,6 +76,9 @@ class PPB_Audio_Impl : public ::ppapi::Resource, // own this pointer but are responsible for calling Shutdown on it. PluginDelegate::PlatformAudioOutput* audio_; + // Track frame count for passing on to PPB_Audio_Shared::SetStreamInfo(). + int sample_frame_count_; + DISALLOW_COPY_AND_ASSIGN(PPB_Audio_Impl); }; |