|
| 1 | +\ ----===< prefix >===----- |
| 2 | +c-library sdl_audio |
| 3 | +s" SDL2" add-lib |
| 4 | +\c #include <SDL2/SDL_audio.h> |
| 5 | + |
| 6 | +\ ----===< int constants >===----- |
| 7 | +#255 constant SDL_AUDIO_MASK_BITSIZE |
| 8 | +#256 constant SDL_AUDIO_MASK_DATATYPE |
| 9 | +#4096 constant SDL_AUDIO_MASK_ENDIAN |
| 10 | +#32768 constant SDL_AUDIO_MASK_SIGNED |
| 11 | +#8 constant AUDIO_U8 |
| 12 | +#32776 constant AUDIO_S8 |
| 13 | +#16 constant AUDIO_U16LSB |
| 14 | +#32784 constant AUDIO_S16LSB |
| 15 | +#4112 constant AUDIO_U16MSB |
| 16 | +#36880 constant AUDIO_S16MSB |
| 17 | +#16 constant AUDIO_U16 |
| 18 | +#32784 constant AUDIO_S16 |
| 19 | +#32800 constant AUDIO_S32LSB |
| 20 | +#36896 constant AUDIO_S32MSB |
| 21 | +#32800 constant AUDIO_S32 |
| 22 | +#33056 constant AUDIO_F32LSB |
| 23 | +#37152 constant AUDIO_F32MSB |
| 24 | +#33056 constant AUDIO_F32 |
| 25 | +#16 constant AUDIO_U16SYS |
| 26 | +#32784 constant AUDIO_S16SYS |
| 27 | +#32800 constant AUDIO_S32SYS |
| 28 | +#33056 constant AUDIO_F32SYS |
| 29 | +#1 constant SDL_AUDIO_ALLOW_FREQUENCY_CHANGE |
| 30 | +#2 constant SDL_AUDIO_ALLOW_FORMAT_CHANGE |
| 31 | +#4 constant SDL_AUDIO_ALLOW_CHANNELS_CHANGE |
| 32 | +#8 constant SDL_AUDIO_ALLOW_SAMPLES_CHANGE |
| 33 | +#15 constant SDL_AUDIO_ALLOW_ANY_CHANGE |
| 34 | +#9 constant SDL_AUDIOCVT_MAX_FILTERS |
| 35 | +#128 constant SDL_MIX_MAXVOLUME |
| 36 | + |
| 37 | +\ --------===< enums >===--------- |
| 38 | +#0 constant SDL_AUDIO_STOPPED |
| 39 | +#1 constant SDL_AUDIO_PLAYING |
| 40 | +#2 constant SDL_AUDIO_PAUSED |
| 41 | + |
| 42 | +\ -------===< structs >===-------- |
| 43 | + |
| 44 | +\ struct SDL_AudioSpec |
| 45 | +begin-structure SDL_AudioSpec |
| 46 | + c-int: SDL_AudioSpec-freq |
| 47 | + c-uint16: SDL_AudioSpec-format |
| 48 | + c-uint8: SDL_AudioSpec-channels |
| 49 | + c-uint8: SDL_AudioSpec-silence |
| 50 | + c-uint16: SDL_AudioSpec-samples |
| 51 | + c-uint16: SDL_AudioSpec-padding |
| 52 | + c-uint32: SDL_AudioSpec-size |
| 53 | + c-func-ptr: SDL_AudioSpec-callback |
| 54 | + c-pointer: SDL_AudioSpec-userdata |
| 55 | +end-structure |
| 56 | + |
| 57 | +\ struct SDL_AudioCVT |
| 58 | +begin-structure SDL_AudioCVT |
| 59 | + c-int: SDL_AudioCVT-needed |
| 60 | + c-uint16: SDL_AudioCVT-src_format |
| 61 | + c-uint16: SDL_AudioCVT-dst_format |
| 62 | + c-double: SDL_AudioCVT-rate_incr |
| 63 | + c-uint8-ptr: SDL_AudioCVT-buf |
| 64 | + c-int: SDL_AudioCVT-len |
| 65 | + c-int: SDL_AudioCVT-len_cvt |
| 66 | + c-int: SDL_AudioCVT-len_mult |
| 67 | + c-double: SDL_AudioCVT-len_ratio |
| 68 | + 10 c-func-ptrs: SDL_AudioCVT-filters |
| 69 | + c-int: SDL_AudioCVT-filter_index |
| 70 | +end-structure |
| 71 | + |
| 72 | +\ ------===< functions >===------- |
| 73 | +c-function SDL_GetNumAudioDrivers SDL_GetNumAudioDrivers -- n ( -- ) |
| 74 | +c-function SDL_GetAudioDriver SDL_GetAudioDriver n -- a ( index -- ) |
| 75 | +c-function SDL_AudioInit SDL_AudioInit a -- n ( driver_name -- ) |
| 76 | +c-function SDL_AudioQuit SDL_AudioQuit -- void ( -- ) |
| 77 | +c-function SDL_GetCurrentAudioDriver SDL_GetCurrentAudioDriver -- a ( -- ) |
| 78 | +c-function SDL_OpenAudio SDL_OpenAudio a a -- n ( desired obtained -- ) |
| 79 | +c-function SDL_GetNumAudioDevices SDL_GetNumAudioDevices n -- n ( iscapture -- ) |
| 80 | +c-function SDL_GetAudioDeviceName SDL_GetAudioDeviceName n n -- a ( index iscapture -- ) |
| 81 | +c-function SDL_GetAudioDeviceSpec SDL_GetAudioDeviceSpec n n a -- n ( index iscapture spec -- ) |
| 82 | +c-function SDL_GetDefaultAudioInfo SDL_GetDefaultAudioInfo a a n -- n ( name spec iscapture -- ) |
| 83 | +c-function SDL_OpenAudioDevice SDL_OpenAudioDevice a n a a n -- n ( device iscapture desired obtained allowed_changes -- ) |
| 84 | +c-function SDL_GetAudioStatus SDL_GetAudioStatus -- n ( -- ) |
| 85 | +c-function SDL_GetAudioDeviceStatus SDL_GetAudioDeviceStatus n -- n ( dev -- ) |
| 86 | +c-function SDL_PauseAudio SDL_PauseAudio n -- void ( pause_on -- ) |
| 87 | +c-function SDL_PauseAudioDevice SDL_PauseAudioDevice n n -- void ( dev pause_on -- ) |
| 88 | +c-function SDL_LoadWAV_RW SDL_LoadWAV_RW a n a a a -- a ( src freesrc spec audio_buf audio_len -- ) |
| 89 | +c-function SDL_FreeWAV SDL_FreeWAV a -- void ( audio_buf -- ) |
| 90 | +c-function SDL_BuildAudioCVT SDL_BuildAudioCVT a n n n n n n -- n ( cvt src_format src_channels src_rate dst_format dst_channels dst_rate -- ) |
| 91 | +c-function SDL_ConvertAudio SDL_ConvertAudio a -- n ( cvt -- ) |
| 92 | +c-function SDL_NewAudioStream SDL_NewAudioStream n n n n n n -- a ( src_format src_channels src_rate dst_format dst_channels dst_rate -- ) |
| 93 | +c-function SDL_AudioStreamPut SDL_AudioStreamPut a a n -- n ( stream buf len -- ) |
| 94 | +c-function SDL_AudioStreamGet SDL_AudioStreamGet a a n -- n ( stream buf len -- ) |
| 95 | +c-function SDL_AudioStreamAvailable SDL_AudioStreamAvailable a -- n ( stream -- ) |
| 96 | +c-function SDL_AudioStreamFlush SDL_AudioStreamFlush a -- n ( stream -- ) |
| 97 | +c-function SDL_AudioStreamClear SDL_AudioStreamClear a -- void ( stream -- ) |
| 98 | +c-function SDL_FreeAudioStream SDL_FreeAudioStream a -- void ( stream -- ) |
| 99 | +c-function SDL_MixAudio SDL_MixAudio a a n n -- void ( dst src len volume -- ) |
| 100 | +c-function SDL_MixAudioFormat SDL_MixAudioFormat a a n n n -- void ( dst src format len volume -- ) |
| 101 | +c-function SDL_QueueAudio SDL_QueueAudio n a n -- n ( dev data len -- ) |
| 102 | +c-function SDL_DequeueAudio SDL_DequeueAudio n a n -- n ( dev data len -- ) |
| 103 | +c-function SDL_GetQueuedAudioSize SDL_GetQueuedAudioSize n -- n ( dev -- ) |
| 104 | +c-function SDL_ClearQueuedAudio SDL_ClearQueuedAudio n -- void ( dev -- ) |
| 105 | +c-function SDL_LockAudio SDL_LockAudio -- void ( -- ) |
| 106 | +c-function SDL_LockAudioDevice SDL_LockAudioDevice n -- void ( dev -- ) |
| 107 | +c-function SDL_UnlockAudio SDL_UnlockAudio -- void ( -- ) |
| 108 | +c-function SDL_UnlockAudioDevice SDL_UnlockAudioDevice n -- void ( dev -- ) |
| 109 | +c-function SDL_CloseAudio SDL_CloseAudio -- void ( -- ) |
| 110 | +c-function SDL_CloseAudioDevice SDL_CloseAudioDevice n -- void ( dev -- ) |
| 111 | + |
| 112 | +\ ----===< postfix >===----- |
| 113 | +end-c-library |
0 commit comments