-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c074438
commit 4ce65b4
Showing
23 changed files
with
475 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
###### (This is the documentation for SDL3, which is under heavy development and the API is changing! [SDL2](https://wiki.libsdl.org/SDL2/) is the current stable version!) | ||
# SDL_AUDIO_BITSIZE | ||
|
||
Retrieve the size, in bits, from an [SDL_AudioFormat](SDL_AudioFormat). | ||
|
||
## Header File | ||
|
||
Defined in [<SDL3/SDL_audio.h>](https://github.com/libsdl-org/SDL/blob/main/include/SDL3/SDL_audio.h) | ||
|
||
## Syntax | ||
|
||
```c | ||
#define SDL_AUDIO_BITSIZE(x) ((x) & SDL_AUDIO_MASK_BITSIZE) | ||
``` | ||
|
||
## Macro Parameters | ||
|
||
| | | | ||
| --------- | ------------------------------------------- | | ||
| **x** | an [SDL_AudioFormat](SDL_AudioFormat) value | | ||
|
||
## Return Value | ||
|
||
Returns data size in bits | ||
|
||
## Remarks | ||
|
||
For example, `SDL_AUDIO_BITSIZE(SDL_AUDIO_S16)` returns 16. | ||
|
||
## Thread Safety | ||
|
||
It is safe to call this macro from any thread. | ||
|
||
## Version | ||
|
||
This macro is available since SDL 3.0.0. | ||
|
||
---- | ||
[CategoryAPI](CategoryAPI), [CategoryAPIMacro](CategoryAPIMacro) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
###### (This is the documentation for SDL3, which is under heavy development and the API is changing! [SDL2](https://wiki.libsdl.org/SDL2/) is the current stable version!) | ||
# SDL_AUDIO_BYTESIZE | ||
|
||
Retrieve the size, in bytes, from an [SDL_AudioFormat](SDL_AudioFormat). | ||
|
||
## Header File | ||
|
||
Defined in [<SDL3/SDL_audio.h>](https://github.com/libsdl-org/SDL/blob/main/include/SDL3/SDL_audio.h) | ||
|
||
## Syntax | ||
|
||
```c | ||
#define SDL_AUDIO_BYTESIZE(x) (SDL_AUDIO_BITSIZE(x) / 8) | ||
``` | ||
|
||
## Macro Parameters | ||
|
||
| | | | ||
| --------- | ------------------------------------------- | | ||
| **x** | an [SDL_AudioFormat](SDL_AudioFormat) value | | ||
|
||
## Return Value | ||
|
||
Returns data size in bytes | ||
|
||
## Remarks | ||
|
||
For example, `SDL_AUDIO_BYTESIZE(SDL_AUDIO_S16)` returns 2. | ||
|
||
## Thread Safety | ||
|
||
It is safe to call this macro from any thread. | ||
|
||
## Version | ||
|
||
This macro is available since SDL 3.0.0. | ||
|
||
---- | ||
[CategoryAPI](CategoryAPI), [CategoryAPIMacro](CategoryAPIMacro) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
###### (This is the documentation for SDL3, which is under heavy development and the API is changing! [SDL2](https://wiki.libsdl.org/SDL2/) is the current stable version!) | ||
# SDL_AUDIO_DEVICE_DEFAULT_CAPTURE | ||
|
||
A value used to request a default capture audio device. | ||
|
||
## Header File | ||
|
||
Defined in [<SDL3/SDL_audio.h>](https://github.com/libsdl-org/SDL/blob/main/include/SDL3/SDL_audio.h) | ||
|
||
## Syntax | ||
|
||
```c | ||
#define SDL_AUDIO_DEVICE_DEFAULT_CAPTURE ((SDL_AudioDeviceID) 0xFFFFFFFE) | ||
``` | ||
## Remarks | ||
Several functions that require an [SDL_AudioDeviceID](SDL_AudioDeviceID) | ||
will accept this value to signify the app just wants the system to choose a | ||
default device instead of the app providing a specific one. | ||
## Version | ||
This macro is available since SDL 3.0.0. | ||
---- | ||
[CategoryAPI](CategoryAPI), [CategoryAPIMacro](CategoryAPIMacro) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
###### (This is the documentation for SDL3, which is under heavy development and the API is changing! [SDL2](https://wiki.libsdl.org/SDL2/) is the current stable version!) | ||
# SDL_AUDIO_DEVICE_DEFAULT_OUTPUT | ||
|
||
A value used to request a default output audio device. | ||
|
||
## Header File | ||
|
||
Defined in [<SDL3/SDL_audio.h>](https://github.com/libsdl-org/SDL/blob/main/include/SDL3/SDL_audio.h) | ||
|
||
## Syntax | ||
|
||
```c | ||
#define SDL_AUDIO_DEVICE_DEFAULT_OUTPUT ((SDL_AudioDeviceID) 0xFFFFFFFF) | ||
``` | ||
## Remarks | ||
Several functions that require an [SDL_AudioDeviceID](SDL_AudioDeviceID) | ||
will accept this value to signify the app just wants the system to choose a | ||
default device instead of the app providing a specific one. | ||
## Version | ||
This macro is available since SDL 3.0.0. | ||
---- | ||
[CategoryAPI](CategoryAPI), [CategoryAPIMacro](CategoryAPIMacro) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
###### (This is the documentation for SDL3, which is under heavy development and the API is changing! [SDL2](https://wiki.libsdl.org/SDL2/) is the current stable version!) | ||
# SDL_AUDIO_FRAMESIZE | ||
|
||
Calculate the size of each audio frame (in bytes) from an [SDL_AudioSpec](SDL_AudioSpec). | ||
|
||
## Header File | ||
|
||
Defined in [<SDL3/SDL_audio.h>](https://github.com/libsdl-org/SDL/blob/main/include/SDL3/SDL_audio.h) | ||
|
||
## Syntax | ||
|
||
```c | ||
#define SDL_AUDIO_FRAMESIZE(x) (SDL_AUDIO_BYTESIZE((x).format) * (x).channels) | ||
``` | ||
## Macro Parameters | ||
| | | | ||
| --------- | ------------------------------------------- | | ||
| **x** | an [SDL_AudioSpec](SDL_AudioSpec) to query. | | ||
## Return Value | ||
Returns the number of bytes used per sample frame. | ||
## Remarks | ||
This reports on the size of an audio sample frame: stereo Sint16 data (2 | ||
channels of 2 bytes each) would be 4 bytes per frame, for example. | ||
## Thread Safety | ||
It is safe to call this macro from any thread. | ||
## Version | ||
This macro is available since SDL 3.0.0. | ||
---- | ||
[CategoryAPI](CategoryAPI), [CategoryAPIMacro](CategoryAPIMacro) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
###### (This is the documentation for SDL3, which is under heavy development and the API is changing! [SDL2](https://wiki.libsdl.org/SDL2/) is the current stable version!) | ||
# SDL_AUDIO_ISBIGENDIAN | ||
|
||
Determine if an [SDL_AudioFormat](SDL_AudioFormat) represents bigendian data. | ||
|
||
## Header File | ||
|
||
Defined in [<SDL3/SDL_audio.h>](https://github.com/libsdl-org/SDL/blob/main/include/SDL3/SDL_audio.h) | ||
|
||
## Syntax | ||
|
||
```c | ||
#define SDL_AUDIO_ISBIGENDIAN(x) ((x) & SDL_AUDIO_MASK_BIG_ENDIAN) | ||
``` | ||
|
||
## Macro Parameters | ||
|
||
| | | | ||
| --------- | ------------------------------------------- | | ||
| **x** | an [SDL_AudioFormat](SDL_AudioFormat) value | | ||
|
||
## Return Value | ||
|
||
Returns non-zero if format is bigendian, zero otherwise. | ||
|
||
## Remarks | ||
|
||
For example, `SDL_AUDIO_ISBIGENDIAN(SDL_AUDIO_S16LE)` returns 0. | ||
|
||
## Thread Safety | ||
|
||
It is safe to call this macro from any thread. | ||
|
||
## Version | ||
|
||
This macro is available since SDL 3.0.0. | ||
|
||
---- | ||
[CategoryAPI](CategoryAPI), [CategoryAPIMacro](CategoryAPIMacro) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
###### (This is the documentation for SDL3, which is under heavy development and the API is changing! [SDL2](https://wiki.libsdl.org/SDL2/) is the current stable version!) | ||
# SDL_AUDIO_ISFLOAT | ||
|
||
Determine if an [SDL_AudioFormat](SDL_AudioFormat) represents floating point data. | ||
|
||
## Header File | ||
|
||
Defined in [<SDL3/SDL_audio.h>](https://github.com/libsdl-org/SDL/blob/main/include/SDL3/SDL_audio.h) | ||
|
||
## Syntax | ||
|
||
```c | ||
#define SDL_AUDIO_ISFLOAT(x) ((x) & SDL_AUDIO_MASK_FLOAT) | ||
``` | ||
|
||
## Macro Parameters | ||
|
||
| | | | ||
| --------- | ------------------------------------------- | | ||
| **x** | an [SDL_AudioFormat](SDL_AudioFormat) value | | ||
|
||
## Return Value | ||
|
||
Returns non-zero if format is floating point, zero otherwise. | ||
|
||
## Remarks | ||
|
||
For example, `SDL_AUDIO_ISFLOAT(SDL_AUDIO_S16)` returns 0. | ||
|
||
## Thread Safety | ||
|
||
It is safe to call this macro from any thread. | ||
|
||
## Version | ||
|
||
This macro is available since SDL 3.0.0. | ||
|
||
---- | ||
[CategoryAPI](CategoryAPI), [CategoryAPIMacro](CategoryAPIMacro) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
###### (This is the documentation for SDL3, which is under heavy development and the API is changing! [SDL2](https://wiki.libsdl.org/SDL2/) is the current stable version!) | ||
# SDL_AUDIO_ISINT | ||
|
||
Determine if an [SDL_AudioFormat](SDL_AudioFormat) represents integer data. | ||
|
||
## Header File | ||
|
||
Defined in [<SDL3/SDL_audio.h>](https://github.com/libsdl-org/SDL/blob/main/include/SDL3/SDL_audio.h) | ||
|
||
## Syntax | ||
|
||
```c | ||
#define SDL_AUDIO_ISINT(x) (!SDL_AUDIO_ISFLOAT(x)) | ||
``` | ||
|
||
## Macro Parameters | ||
|
||
| | | | ||
| --------- | ------------------------------------------- | | ||
| **x** | an [SDL_AudioFormat](SDL_AudioFormat) value | | ||
|
||
## Return Value | ||
|
||
Returns non-zero if format is integer, zero otherwise. | ||
|
||
## Remarks | ||
|
||
For example, `SDL_AUDIO_ISINT(SDL_AUDIO_F32)` returns 0. | ||
|
||
## Thread Safety | ||
|
||
It is safe to call this macro from any thread. | ||
|
||
## Version | ||
|
||
This macro is available since SDL 3.0.0. | ||
|
||
---- | ||
[CategoryAPI](CategoryAPI), [CategoryAPIMacro](CategoryAPIMacro) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
###### (This is the documentation for SDL3, which is under heavy development and the API is changing! [SDL2](https://wiki.libsdl.org/SDL2/) is the current stable version!) | ||
# SDL_AUDIO_ISLITTLEENDIAN | ||
|
||
Determine if an [SDL_AudioFormat](SDL_AudioFormat) represents littleendian data. | ||
|
||
## Header File | ||
|
||
Defined in [<SDL3/SDL_audio.h>](https://github.com/libsdl-org/SDL/blob/main/include/SDL3/SDL_audio.h) | ||
|
||
## Syntax | ||
|
||
```c | ||
#define SDL_AUDIO_ISLITTLEENDIAN(x) (!SDL_AUDIO_ISBIGENDIAN(x)) | ||
``` | ||
## Macro Parameters | ||
| | | | ||
| --------- | ------------------------------------------- | | ||
| **x** | an [SDL_AudioFormat](SDL_AudioFormat) value | | ||
## Return Value | ||
Returns non-zero if format is littleendian, zero otherwise. | ||
## Remarks | ||
For example, `SDL_AUDIO_ISLITTLEENDIAN(SDL_AUDIO_S16BE)` returns 0. | ||
## Thread Safety | ||
It is safe to call this macro from any thread. | ||
## Version | ||
This macro is available since SDL 3.0.0. | ||
---- | ||
[CategoryAPI](CategoryAPI), [CategoryAPIMacro](CategoryAPIMacro) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
###### (This is the documentation for SDL3, which is under heavy development and the API is changing! [SDL2](https://wiki.libsdl.org/SDL2/) is the current stable version!) | ||
# SDL_AUDIO_ISSIGNED | ||
|
||
Determine if an [SDL_AudioFormat](SDL_AudioFormat) represents signed data. | ||
|
||
## Header File | ||
|
||
Defined in [<SDL3/SDL_audio.h>](https://github.com/libsdl-org/SDL/blob/main/include/SDL3/SDL_audio.h) | ||
|
||
## Syntax | ||
|
||
```c | ||
#define SDL_AUDIO_ISSIGNED(x) ((x) & SDL_AUDIO_MASK_SIGNED) | ||
``` | ||
|
||
## Macro Parameters | ||
|
||
| | | | ||
| --------- | ------------------------------------------- | | ||
| **x** | an [SDL_AudioFormat](SDL_AudioFormat) value | | ||
|
||
## Return Value | ||
|
||
Returns non-zero if format is signed, zero otherwise. | ||
|
||
## Remarks | ||
|
||
For example, `SDL_AUDIO_ISSIGNED(SDL_AUDIO_U8)` returns 0. | ||
|
||
## Thread Safety | ||
|
||
It is safe to call this macro from any thread. | ||
|
||
## Version | ||
|
||
This macro is available since SDL 3.0.0. | ||
|
||
---- | ||
[CategoryAPI](CategoryAPI), [CategoryAPIMacro](CategoryAPIMacro) | ||
|
Oops, something went wrong.