#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <stddef.h>
Go to the source code of this file.
|
| enum | SDL_errorcode {
SDL_ENOMEM
, SDL_EFREAD
, SDL_EFWRITE
, SDL_EFSEEK
,
SDL_UNSUPPORTED
, SDL_LASTERROR
} |
| enum | SDL_bool { SDL_FALSE = 0
, SDL_TRUE = 1
} |
| enum | Mix_Fading { MIX_NO_FADING
, MIX_FADING_OUT
, MIX_FADING_IN
} |
| enum | Mix_MusicType {
MUS_NONE
, MUS_HTML5
, MUS_CMD
, MUS_WAV
,
MUS_MOD
, MUS_MID
, MUS_OGG
, MUS_MP3
,
MUS_MP3_MAD_UNUSED
, MUS_FLAC
, MUS_MODPLUG_UNUSED
} |
◆ DECLSPEC
◆ fseek_off_t
◆ HAVE_STDARG_H
◆ HAVE_STDDEF_H
◆ HAVE_STDINT_H
◆ HAVE_STDIO_H
◆ MIX_MAX_VOLUME
◆ Mix_SetError
◆ RW_SEEK_CUR
Seek relative to current read point
◆ RW_SEEK_END
Seek relative to the end of data
◆ RW_SEEK_SET
Seek from the beginning of data
◆ SDL_calloc
| #define SDL_calloc calloc |
◆ SDL_Error
| #define SDL_Error |
( |
| code | ) |
|
Value:fprintf(stdout,
"SDL Error: %d\n",
code)
std::string code
Definition test.cpp:145
◆ SDL_free
◆ SDL_malloc
| #define SDL_malloc malloc |
◆ SDL_MIX_MAXVOLUME
| #define SDL_MIX_MAXVOLUME (128) |
◆ SDL_OutOfMemory
| #define SDL_OutOfMemory |
( |
| ) |
|
Value:
@ SDL_ENOMEM
Definition prerequisites.h:134
#define SDL_Error(code)
Definition prerequisites.h:44
◆ SDL_RWclose
| #define SDL_RWclose |
( |
| ctx | ) |
|
◆ SDL_RWOPS_MEMORY
| #define SDL_RWOPS_MEMORY 4U |
◆ SDL_RWOPS_MEMORY_RO
| #define SDL_RWOPS_MEMORY_RO 5U |
◆ SDL_RWOPS_STDFILE
| #define SDL_RWOPS_STDFILE 2U |
◆ SDL_RWOPS_UNKNOWN
| #define SDL_RWOPS_UNKNOWN 0U |
◆ SDL_RWseek
| #define SDL_RWseek |
( |
| ctx, |
|
|
| offset, |
|
|
| whence ) |
Value:(ctx)->seek(ctx, offset, whence)
Seek to offset relative to whence, one of stdio's whence values: RW_SEEK_SET, RW_SEEK_CUR, RW_SEEK_END
- Returns
- the final offset in the data stream, or -1 on error.
◆ SDL_SetError
| #define SDL_SetError |
( |
| ... | ) |
|
Value:{fprintf(stdout, __VA_ARGS__); fprintf(stdout, "\n");}
◆ SDLCALL
◆ Mix_Music
◆ SDL_AudioCallback
| typedef void(SDLCALL * SDL_AudioCallback) (void *userdata, Uint8 *stream, int len) |
This function is called when the audio device needs more data.
- Parameters
-
| userdata | An application-specific parameter saved in the SDL_AudioSpec structure |
| stream | A pointer to the audio data buffer. |
| len | The length of that buffer in bytes. |
Once the callback returns, the buffer will no longer be valid. Stereo samples are stored in a LRLRLR ordering.
You can choose to avoid callbacks and use SDL_QueueAudio() instead, if you like. Just open your audio device with a NULL callback.
◆ SDL_AudioFormat
Audio format flags.
These are what the 16 bits in SDL_AudioFormat currently mean... (Unspecified bits are always zero).
++-----------------------sample is signed if set
||
|| ++-----------sample is bigendian if set
|| ||
|| || ++---sample is float if set
|| || ||
|| || || +---sample bit size---+
|| || || | |
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
There are macros in SDL 2.0 and later to query these bits.
◆ SDL_AudioSpec
| typedef struct SDL_AudioSpec SDL_AudioSpec |
◆ SDL_RWops
| typedef struct SDL_RWops SDL_RWops |
◆ Sint16
◆ Sint32
◆ Sint64
◆ Sint8
◆ Uint16
◆ Uint32
◆ Uint64
◆ Uint8
◆ Mix_Fading
| Enumerator |
|---|
| MIX_NO_FADING | |
| MIX_FADING_OUT | |
| MIX_FADING_IN | |
◆ Mix_MusicType
| Enumerator |
|---|
| MUS_NONE | |
| MUS_HTML5 | |
| MUS_CMD | |
| MUS_WAV | |
| MUS_MOD | |
| MUS_MID | |
| MUS_OGG | |
| MUS_MP3 | |
| MUS_MP3_MAD_UNUSED | |
| MUS_FLAC | |
| MUS_MODPLUG_UNUSED | |
◆ SDL_bool
| Enumerator |
|---|
| SDL_FALSE | |
| SDL_TRUE | |
◆ SDL_errorcode
| Enumerator |
|---|
| SDL_ENOMEM | |
| SDL_EFREAD | |
| SDL_EFWRITE | |
| SDL_EFSEEK | |
| SDL_UNSUPPORTED | |
| SDL_LASTERROR | |
◆ SDL_AllocRW()
◆ SDL_FreeRW()
◆ SDL_RWFromFile()
◆ SDL_RWFromFP()