Plugins:PepperAudioAPI: Difference between revisions

Jump to navigation Jump to search
Line 73: Line 73:
:queryCapability, queryConfig, initializeContext, getStateContext, setStateContext,destroyContext
:queryCapability, queryConfig, initializeContext, getStateContext, setStateContext,destroyContext


The only device method that can be called from another thread is flushContext when usingthe push model. When using the callback model, it is expected that the user suppliedcallback will be invoked on a thread dedicated to audio. This dedicated audio thread is not an NPAPI thread.  
The only device method that can be called from another thread is flushContext when using the push model. When using the callback model, it is expected that the user supplied callback will be invoked on a thread dedicated to audio. This dedicated audio thread is not an NPAPI thread.  


When creating an audio context, usually this is done as part of a plug-in instance. In untrusted Pepper modules, there will be one instance per sandboxed process. However, this could change in the future, and an untrusted Pepper plug-in could host multiple instances in the same sandbox. In this case, it may be desirable to have one audio device, with it's own application supplied mixer, to be shared amongst multiple untrusted plug-in instances. This audio context should be created at plug-in initialization, using NULL as the npp instance argument.
When creating an audio context, usually this is done as part of a plug-in instance. In untrusted Pepper modules, there will be one instance per sandboxed process. However, this could change in the future, and an untrusted Pepper plug-in could host multiple instances in the same sandbox. In this case, it may be desirable to have one audio device, with it's own application supplied mixer, to be shared amongst multiple untrusted plug-in instances. This audio context should be created at plug-in initialization, using NULL as the npp instance argument.
Confirmed users, Bureaucrats and Sysops emeriti
1,680

edits

Navigation menu