mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-20 11:48:29 +00:00
Sync SDL3 wiki -> header
[ci skip]
This commit is contained in:
parent
6c99a4b783
commit
dcf6dd19c3
1 changed files with 17 additions and 1 deletions
|
@ -33,7 +33,7 @@
|
|||
* even if the data format changes on either side halfway through.
|
||||
*
|
||||
* An app opens an audio device and binds any number of audio streams to it,
|
||||
* feeding more data to the streams as available. When the devices needs more
|
||||
* feeding more data to the streams as available. When the device needs more
|
||||
* data, it will pull it from all bound streams and mix them together for
|
||||
* playback.
|
||||
*
|
||||
|
@ -67,6 +67,22 @@
|
|||
* keep playing; the app doesn't even have to know it happened if it doesn't
|
||||
* want to.
|
||||
*
|
||||
* ## Simplified audio
|
||||
*
|
||||
* As a simplified model for when a single source of audio is all that's
|
||||
* needed, an app can use SDL_OpenAudioDeviceStream, which is a single
|
||||
* function to open an audio device, create an audio stream, bind that stream
|
||||
* to the newly-opened device, and (optionally) provide a callback for
|
||||
* obtaining audio data. When using this function, the primary interface is
|
||||
* the SDL_AudioStream and the device handle is mostly hidden away; destroying
|
||||
* a stream created through this function will also close the device, stream
|
||||
* bindings cannot be changed, etc. One other quirk of this is that the device
|
||||
* is started in a _paused_ state and must be explicitly resumed; this is
|
||||
* partially to offer a clean migration for SDL2 apps and partially because
|
||||
* the app might have to do more setup before playback begins; in the
|
||||
* non-simplified form, nothing will play until a stream is bound to a device,
|
||||
* so they start _unpaused_.
|
||||
*
|
||||
* ## Channel layouts
|
||||
*
|
||||
* Audio data passing through SDL is uncompressed PCM data, interleaved. One
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue