Plugins:PepperAudioAPI: Difference between revisions

Line 48: Line 48:
=====Background:=====
=====Background:=====


Native Client plug-ins have up until now used an audio API very similar to a blockingflushContext() call, usually done on a thread dedicated to audio. The API call wasimplemented as a syscall, and at the service runtime (kernel) level used SDL to deliver low latency audio across multiple platforms. As Native Client moves into a more secure sandbox environment, untrusted code will no longer be able to communicate directly with audio devices in the same process. In the new audio model, trusted code in another process will be attached to the audio device, and the sandboxed Native Client untrusted application will use shared memory and sockets to communicate its audio needs outside the sandbox. The new API for this model will be part of PEPPER, a variant of NPAPI that is designed to be platform neutral.  
Up until now, NPAPI plug-ins have traditionally done audio output either via third party audio libraries or directly with platform specific audio APIs. This document describes a unified audio API for PEPPER, an extension of NPAPI for platform independent developement.


Please refer to Appendix A for a list of links pertaining to audio.Please refer to Appendix B for PEPPER design wiki -- where this document will migrate once approved.  
Please refer to Appendix A for a list of links pertaining to audio. Please refer to Appendix B for PEPPER design wiki -- where this document will migrate once approved.  


Both models will need additional PEPPER events. Please refer to Appendix C for audio related events.  
Both models will need additional PEPPER events. Please refer to Appendix C for audio related events.  


Both models support multi-channel configurations. Please refer to Appendix E for multi-channel output scenarios. Please refer to Appendix F for input scenarios. Please refer to Appendix G for contributors.
Both models support multi-channel configurations. Please refer to Appendix E for multi-channel output scenarios. Please refer to Appendix F for input scenarios. Please refer to Appendix G for contributors.


===Changes to Pepper's Device API===
===Changes to Pepper's Device API===
45

edits