diff options
author | sehr@google.com <sehr@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-09 23:56:39 +0000 |
---|---|---|
committer | sehr@google.com <sehr@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-09 23:56:39 +0000 |
commit | 8d292399e6dcdfa776a1de94da07841bf1487f5b (patch) | |
tree | a70d24eccd67dd83092de47eae8388aa69245ff5 /webkit/tools/pepper_test_plugin | |
parent | 9923b6dc2cb443d5c8c10fa4a33746cd284fb9bb (diff) | |
download | chromium_src-8d292399e6dcdfa776a1de94da07841bf1487f5b.zip chromium_src-8d292399e6dcdfa776a1de94da07841bf1487f5b.tar.gz chromium_src-8d292399e6dcdfa776a1de94da07841bf1487f5b.tar.bz2 |
Audio support for native client requires some additional features
from pepper. Notably, the existing pepper implementation was, by
default, creating a high-priority producer thread. For the NaCl
version this thread should be in the NaCl module, and hence we
need to separate thread creation from pre-filling with the callback.
The latter is used to send an RPC to NaCl to pass the shared memory
and sync socket. Getting the shared memory was done by the first
reserved state value. Getting the sync socket required allocating
a second. Also changed the pepper test plugin to use the
new startThread member.
Review URL: http://codereview.chromium.org/593023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38544 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/pepper_test_plugin')
-rw-r--r-- | webkit/tools/pepper_test_plugin/plugin_object.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/webkit/tools/pepper_test_plugin/plugin_object.cc b/webkit/tools/pepper_test_plugin/plugin_object.cc index 4c1b2a6..35c2a2c 100644 --- a/webkit/tools/pepper_test_plugin/plugin_object.cc +++ b/webkit/tools/pepper_test_plugin/plugin_object.cc @@ -399,6 +399,7 @@ void PluginObject::SetWindow(const NPWindow& window) { cfg.outputChannelMap = NPAudioChannelStereo; cfg.inputChannelMap = NPAudioChannelNone; cfg.sampleFrameCount = 2048; + cfg.startThread = 1; // Start a thread for the audio producer. cfg.flags = 0; cfg.callback = &SineWaveCallback<200, int16>; deviceaudio_->initializeContext(npp_, &cfg, &context_audio_); |