Commit graph

122 commits

Author SHA1 Message Date
Sam Lantinga
66aac9aced Fixed channel order typo 2024-06-10 18:05:31 -07:00
SDL Wiki Bot
454d890bef Sync SDL3 wiki -> header 2024-06-11 00:57:54 +00:00
Ryan C. Gordon
d3a62d8298
audio: Update docs on channel ordering. 2024-06-10 20:56:50 -04:00
Ryan C. Gordon
e23257307e Introduce formal policy for APIs that return strings.
This declares that any `const char *` returned from SDL is owned by SDL, and
promises to be valid _at least_ until the next time the event queue runs, or
SDL_Quit() is called, even if the thing that owns the string gets destroyed
or changed before then.

This is noted in the headers as "the SDL_GetStringRule", so this will both be
greppable to find a detailed explaination in docs/README-strings.md and
wikiheaders will automatically turn it into a link we can point at the
appropriate documentation.

Fixes #9902.

(and several FIXMEs, both known and yet-undocumented.)
2024-06-03 14:20:49 -04:00
Ryan C. Gordon
a4ccace9c5
include: Fix warnings from gendynapi.py.
Fixes #9890.
2024-05-26 13:44:16 -04:00
SDL Wiki Bot
8e3ff8c3a1 Sync SDL3 wiki -> header 2024-05-26 17:21:54 +00:00
Sam Lantinga
534768c7c5 Added SDL_PauseAudioStreamDevice() and SDL_ResumeAudioStreamDevice() 2024-05-26 13:21:23 -04:00
SDL Wiki Bot
84cb065da2 Sync SDL3 wiki -> header 2024-05-26 03:34:35 +00:00
Ryan C. Gordon
033793faed
audio: SDL_OpenAudioDeviceStream() now allows a NULL spec. 2024-05-25 23:34:01 -04:00
Ryan C. Gordon
6a40a8eb12
audio: Minor documentation clarifications. 2024-05-25 23:34:00 -04:00
Sam Lantinga
6f2621438a Renamed DECLSPEC to SDL_DECLSPEC 2024-05-17 17:09:09 -07:00
SDL Wiki Bot
eda9247f01 Sync SDL3 wiki -> header 2024-05-17 12:37:31 +00:00
Brick
b6b9d5508e Renamed SDL_MixAudioFormat to SDL_MixAudio, and use float volume 2024-05-17 13:36:51 +01:00
Ryan C. Gordon
5e6d85b8f0
wikiheaders: bridge wiki Category docs to the headers!
Did an initial cleanup on the headers and wrote a few pieces of documentation,
but this needs more work to fill out the documentation.
2024-05-16 11:48:23 -04:00
SDL Wiki Bot
678cfd23c0 Sync SDL3 wiki -> header 2024-05-13 21:30:12 +00:00
SDL Wiki Bot
7d6453ea33 Sync SDL3 wiki -> header 2024-05-13 21:24:33 +00:00
Ryan C. Gordon
766de7deff
SDL_audio.h: Whoops, one more documentation typo! 2024-05-13 17:24:08 -04:00
Ryan C. Gordon
7bc4bb9f96
SDL_audio.h: Fixed a documentation typo. 2024-05-13 17:23:21 -04:00
Susko3
895586c928 Use 1u literal for flags/masks calculation
Changes `1 <<` and `1<<` to use `1u`.
2024-05-09 10:29:48 -07:00
Sam Lantinga
aecb62e30d Improved API consistency for flag data types
Flag data types are always unsigned and have the valid values following the typedef.
2024-05-07 12:24:37 -07:00
Ryan C. Gordon
a790a67883
include: Filling in more documentation gaps. 2024-05-03 13:19:26 -04:00
Ryan C. Gordon
9f842e9b5a
wikiheaders: Bind #defines below a function to it, like typedefs.
This effectively adds the property symbols for various functions to the
function's wiki page.
2024-05-02 12:49:30 -04:00
Ryan C. Gordon
6b1a98e664
wikiheaders: Allow basic typedefs to pull in some preprocessor logic.
Reference Issue #9557.

This lets SDL_AudioFormat have the `#if byteorder == lilendian` section.
2024-04-25 16:44:09 -04:00
Ryan C. Gordon
d29b861a76
wikiheaders: Allow blank lines in post-typedef #define blocks.
Reference Issue #9557.
2024-04-25 14:26:49 -04:00
SDL Wiki Bot
47ff4addd4 Sync SDL3 wiki -> header 2024-04-25 06:37:31 +00:00
Ryan C. Gordon
2733345422
SDL_audio.h: Documentation updates. 2024-04-25 02:36:08 -04:00
Brick
edaab8ad9f Refactored audio conversion to reduce copying
More of the logic has been moved into SDL_AudioQueue,
allowing data to be converted directly from the input buffer.
2024-04-15 11:47:18 -10:00
Ryan C. Gordon
0df988389c
include: Add \since to all documentation that was missing it. 2024-04-11 13:34:29 -04:00
SDL Wiki Bot
073d2378dc Sync SDL3 wiki -> header 2024-04-11 12:59:41 +00:00
Ryan C. Gordon
9421a01400
SDL_AudioStreamCallback: Note that there's no _requirement_ to do anything.
This is as opposed to something like the SDL2 audio callback, where you
_must_ supply data or disaster occurs.
2024-04-11 08:56:10 -04:00
Ryan C. Gordon
407e54e188
include: More improved docs for the wikibridge! 2024-04-11 00:37:11 -04:00
Ryan C. Gordon
f121553082
include: Fixed up SDL_AudioFormat documentation.
(this is not currently bridged to the wiki, but will be soon!)
2024-04-10 18:45:29 -04:00
Ryan C. Gordon
e044318a8e
Sync SDL3 wiki -> headers 2024-04-09 00:50:03 -04:00
Ryan C. Gordon
ad090d2444
include: A ton of little documentation tweaks, fixes, and improvements.
This is just stuff I noticed while working on the wikiheaders updates. A
thorough pass over all the docs would not be terrible, and maybe a simple
script to check for consistency (does everything have a `\since` on it? etc)
might be nice, too.
2024-04-09 00:50:02 -04:00
Sam Lantinga
d8a54cd4f8 Updated "see also" references to be more consistent
Fixes https://github.com/libsdl-org/SDL/issues/9282
2024-03-17 12:28:11 -07:00
Ryan C. Gordon
5a21d87e69
rwops: Changed filenames that reference "rwops" to "iostream". 2024-03-14 23:30:59 -04:00
Ryan C. Gordon
6776b6108a
iostream: "free*" params should be "closeio". 2024-03-14 23:14:46 -04:00
Ryan C. Gordon
fc7afa9cbf
rwops: Renamed SDL_RWops to SDL_IOStream, and other related symbols. 2024-03-14 19:38:12 -04:00
Ryan C. Gordon
655ceb3b31
rwops: Renamed SDL_CreateRW and SDL_DestroyRW to SDL_OpenRW and SDL_CloseRW. 2024-03-14 19:37:01 -04:00
Ryan C. Gordon
525919b315
rwops: Reworked RWops for SDL3.
- SDL_RWops is now an opaque struct.
- SDL_AllocRW is gone. If an app is creating a custom RWops, they pass the
  function pointers to SDL_CreateRW(), which are stored internally.
- SDL_RWclose is gone, there is only SDL_DestroyRW(), which calls the
  implementation's `->close` method before freeing other things.
- There is only one path to create and use RWops now, so we don't have to
  worry about whether `->close` will call SDL_DestroyRW, or if this will
  risk any Properties not being released, etc.
- SDL_RWFrom* still works as expected, for getting a RWops without having
  to supply your own implementation. Objects from these functions are also
  destroyed with SDL_DestroyRW.
- Lots of other cleanup and SDL3ization of the library code.
2024-03-14 19:36:08 -04:00
Sam Lantinga
5b3ee51c6c Updated copyright for 2024 2024-01-01 13:15:26 -08:00
Ryan C. Gordon
c53843a961
docs: Remove Doxygen \brief tags.
Doxygen and the wiki bridge don't need them; they'll both just use the first
line/sentence instead.

Fixes #8446.
2023-11-06 10:26:06 -05:00
Ryan C. Gordon
1a8bf31a69 include: Fixing whitespace on SDL_MixAudioFormat. 2023-11-04 15:06:41 -04:00
SDL Wiki Bot
142366c837 Sync SDL3 wiki -> header 2023-10-19 14:03:06 +00:00
Sam Lantinga
b45a0d9016 Updated the documentation for SDL_LoadWAV_RW() 2023-10-17 20:27:49 -07:00
Ryan C. Gordon
ac71831350
Sync wiki -> headers 2023-10-12 15:20:53 -04:00
Sam Lantinga
4368f70ff9 Added properties to various SDL objects
The following objects now have properties that can be user modified:
* SDL_AudioStream
* SDL_Gamepad
* SDL_Joystick
* SDL_RWops
* SDL_Renderer
* SDL_Sensor
* SDL_Surface
* SDL_Texture
* SDL_Window
2023-10-11 22:38:00 -07:00
Ryan C. Gordon
a4541a255e
audio: SDL_GetAudioStreamQueued now returns bytes, not frames.
Reference #8266.
2023-09-20 14:15:47 -04:00
Ryan C. Gordon
703aefbce0
Sync SDL3 wiki -> header 2023-09-20 14:08:32 -04:00
Ryan C. Gordon
34b931f7eb audio: Added SDL_GetAudioStreamQueued 2023-09-20 10:15:03 -04:00