@@ -2095,12 +2095,12 @@ extern fn SDL_GetCurrentAudioDriver() [*:0]const u8;
20952095///
20962096/// Returns a 0 terminated array of device instance IDs or NULL on error;
20972097/// call SDL_free() when it is no longer needed.
2098- pub fn getAudioPlaybackDevices () Error ! []AudioDeviceID {
2098+ pub fn getAudioPlaybackDevices () Error ! []AudioDeviceId {
20992099 var count : c_int = undefined ;
21002100 const maybe_list = SDL_GetAudioPlaybackDevices (& count );
21012101 return if (maybe_list ) | list | list [0.. @intCast (count )] else makeError ();
21022102}
2103- extern fn SDL_GetAudioPlaybackDevices (out_count : ? * c_int ) ? [* ]AudioDeviceID ;
2103+ extern fn SDL_GetAudioPlaybackDevices (out_count : ? * c_int ) ? [* ]AudioDeviceId ;
21042104
21052105/// Get a list of currently-connected audio recording devices.
21062106///
@@ -2111,27 +2111,27 @@ extern fn SDL_GetAudioPlaybackDevices(out_count: ?*c_int) ?[*]AudioDeviceID;
21112111///
21122112/// Returns a 0 terminated array of device instance IDs or NULL on error;
21132113/// call SDL_free() when it is no longer needed.
2114- pub fn getAudioRecordingDevices () Error ! []AudioDeviceID {
2114+ pub fn getAudioRecordingDevices () Error ! []AudioDeviceId {
21152115 var count : c_int = undefined ;
21162116 const maybe_list = SDL_GetAudioRecordingDevices (& count );
21172117 return if (maybe_list ) | list | list [0.. @intCast (count )] else makeError ();
21182118}
2119- extern fn SDL_GetAudioRecordingDevices (out_count : ? * c_int ) ? [* ]AudioDeviceID ;
2119+ extern fn SDL_GetAudioRecordingDevices (out_count : ? * c_int ) ? [* ]AudioDeviceId ;
21202120
21212121/// Get the human-readable name of a specific audio device.
21222122pub const getAudioDeviceName = SDL_GetAudioDeviceName ;
2123- extern fn SDL_GetAudioDeviceName (AudioDeviceID ) [* :0 ]const u8 ;
2123+ extern fn SDL_GetAudioDeviceName (AudioDeviceId ) [* :0 ]const u8 ;
21242124
21252125/// Get the current audio format of a specific audio device.
2126- pub fn getAudioDeviceFormat (devid : AudioDeviceID ) Error ! struct { spec : AudioSpec , sample_frames : c_int } {
2126+ pub fn getAudioDeviceFormat (devid : AudioDeviceId ) Error ! struct { spec : AudioSpec , sample_frames : c_int } {
21272127 var spec : AudioSpec = undefined ;
21282128 var sample_frames : c_int = undefined ;
21292129 if (SDL_GetAudioDeviceFormat (devid , & spec , & sample_frames ) == False ) {
21302130 return makeError ();
21312131 }
21322132 return .{ .spec = spec , .sample_frames = sample_frames };
21332133}
2134- extern fn SDL_GetAudioDeviceFormat (AudioDeviceID , out_spec : * AudioSpec , out_sample_frames : * c_int ) Bool ;
2134+ extern fn SDL_GetAudioDeviceFormat (AudioDeviceId , out_spec : * AudioSpec , out_sample_frames : * c_int ) Bool ;
21352135
21362136/// Get the current audio format of a specific audio device.
21372137/// Channel maps are optional; most things do not need them, instead passing
@@ -2143,29 +2143,29 @@ extern fn SDL_GetAudioDeviceFormat(AudioDeviceID, out_spec: *AudioSpec, out_samp
21432143/// Returns an array of the current channel mapping, with as many elements as
21442144/// the current output spec's channels, or NULL if default. This
21452145/// should be freed with SDL_free() when it is no longer needed.
2146- pub fn getAudioDeviceChannelMap (devid : AudioDeviceID ) ? []c_int {
2146+ pub fn getAudioDeviceChannelMap (devid : AudioDeviceId ) ? []c_int {
21472147 var count : c_int = undefined ;
21482148 return if (SDL_GetAudioDeviceChannelMap (devid , & count )) | list_ptr | list_ptr [0.. @intCast (count )] else null ;
21492149}
2150- extern fn SDL_GetAudioDeviceChannelMap (AudioDeviceID , out_count : * c_int ) [* c ]c_int ;
2150+ extern fn SDL_GetAudioDeviceChannelMap (AudioDeviceId , out_count : * c_int ) [* c ]c_int ;
21512151
21522152/// Open a specific audio device.
2153- pub fn openAudioDevice (device : AudioDeviceID , spec : ? * const AudioSpec ) Error ! void {
2153+ pub fn openAudioDevice (device : AudioDeviceId , spec : ? * const AudioSpec ) Error ! void {
21542154 if (SDL_OpenAudioDevice (device , spec ) == 0 ) {
21552155 return makeError ();
21562156 }
21572157}
2158- extern fn SDL_OpenAudioDevice (AudioDeviceID , ? * const AudioSpec ) AudioDeviceID ;
2158+ extern fn SDL_OpenAudioDevice (AudioDeviceId , ? * const AudioSpec ) AudioDeviceId ;
21592159
2160- pub fn isAudioDevicePhysical (devid : AudioDeviceID ) bool {
2160+ pub fn isAudioDevicePhysical (devid : AudioDeviceId ) bool {
21612161 return SDL_IsAudioDevicePhysical (devid ) == True ;
21622162}
2163- extern fn SDL_IsAudioDevicePhysical (AudioDeviceID ) Bool ;
2163+ extern fn SDL_IsAudioDevicePhysical (AudioDeviceId ) Bool ;
21642164
2165- pub fn isAudioDevicePlayback (devid : AudioDeviceID ) bool {
2165+ pub fn isAudioDevicePlayback (devid : AudioDeviceId ) bool {
21662166 return SDL_IsAudioDevicePlayback (devid ) == True ;
21672167}
2168- extern fn SDL_IsAudioDevicePlayback (AudioDeviceID ) Bool ;
2168+ extern fn SDL_IsAudioDevicePlayback (AudioDeviceId ) Bool ;
21692169
21702170/// Use this function to pause audio playback on a specified device.
21712171///
@@ -2183,10 +2183,10 @@ extern fn SDL_IsAudioDevicePlayback(AudioDeviceID) Bool;
21832183///
21842184/// Physical devices can not be paused or unpaused, only logical devices
21852185/// created through SDL_OpenAudioDevice() can be.
2186- pub fn pauseAudioDevice (device : AudioDeviceID ) bool {
2186+ pub fn pauseAudioDevice (device : AudioDeviceId ) bool {
21872187 return SDL_PauseAudioDevice (device ) == True ;
21882188}
2189- extern fn SDL_PauseAudioDevice (AudioDeviceID ) Bool ;
2189+ extern fn SDL_PauseAudioDevice (AudioDeviceId ) Bool ;
21902190
21912191/// Use this function to unpause audio playback on a specified device.
21922192///
@@ -2201,10 +2201,10 @@ extern fn SDL_PauseAudioDevice(AudioDeviceID) Bool;
22012201///
22022202/// Physical devices can not be paused or unpaused, only logical devices
22032203/// created through SDL_OpenAudioDevice() can be.
2204- pub fn resumeAudioDevice (device : AudioDeviceID ) bool {
2204+ pub fn resumeAudioDevice (device : AudioDeviceId ) bool {
22052205 return SDL_ResumeAudioDevice (device ) == True ;
22062206}
2207- extern fn SDL_ResumeAudioDevice (AudioDeviceID ) Bool ;
2207+ extern fn SDL_ResumeAudioDevice (AudioDeviceId ) Bool ;
22082208
22092209/// Use this function to query if an audio device is paused.
22102210///
@@ -2214,20 +2214,20 @@ extern fn SDL_ResumeAudioDevice(AudioDeviceID) Bool;
22142214///
22152215/// Physical devices can not be paused or unpaused, only logical devices
22162216/// created through SDL_OpenAudioDevice() can be.
2217- pub fn audioDevicePaused (device : AudioDeviceID ) bool {
2217+ pub fn audioDevicePaused (device : AudioDeviceId ) bool {
22182218 return SDL_AudioDevicePaused (device ) == True ;
22192219}
2220- extern fn SDL_AudioDevicePaused (AudioDeviceID ) Bool ;
2220+ extern fn SDL_AudioDevicePaused (AudioDeviceId ) Bool ;
22212221
22222222/// Get the gain of an audio device.
22232223///
22242224/// Physical devices may not have their gain changed, only logical devices, and
22252225/// this function will always return -1.0f when used on physical devices.
2226- pub fn getAudioDeviceGain (device : AudioDeviceID ) Error ! f32 {
2226+ pub fn getAudioDeviceGain (device : AudioDeviceId ) Error ! f32 {
22272227 const gain = SDL_GetAudioDeviceGain (device );
22282228 return if (gain == -1.0 ) makeError () else gain ;
22292229}
2230- extern fn SDL_GetAudioDeviceGain (AudioDeviceID ) f32 ;
2230+ extern fn SDL_GetAudioDeviceGain (AudioDeviceId ) f32 ;
22312231
22322232/// Change the gain of an audio device.
22332233///
@@ -2243,12 +2243,12 @@ extern fn SDL_GetAudioDeviceGain(AudioDeviceID) f32;
22432243/// an audiostream; that recording audiostream can then adjust its gain further
22442244/// when outputting the data elsewhere, if it likes, but that second gain is
22452245/// not applied until the data leaves the audiostream again.
2246- pub fn setAudioDeviceGain (device : AudioDeviceID , gain : f32 ) Error ! void {
2246+ pub fn setAudioDeviceGain (device : AudioDeviceId , gain : f32 ) Error ! void {
22472247 if (SDL_SetAudioDeviceGain (device , gain ) == False ) {
22482248 return makeError ();
22492249 }
22502250}
2251- extern fn SDL_SetAudioDeviceGain (AudioDeviceID , f32 ) Bool ;
2251+ extern fn SDL_SetAudioDeviceGain (AudioDeviceId , f32 ) Bool ;
22522252
22532253/// Close a previously-opened audio device.
22542254///
@@ -2258,7 +2258,7 @@ extern fn SDL_SetAudioDeviceGain(AudioDeviceID, f32) Bool;
22582258/// hardware, so that applications don't drop the last buffer of data they
22592259/// supplied if terminating immediately afterwards.
22602260pub const closeAudioDevice = SDL_CloseAudioDevice ;
2261- extern fn SDL_CloseAudioDevice (AudioDeviceID ) void ;
2261+ extern fn SDL_CloseAudioDevice (AudioDeviceId ) void ;
22622262
22632263// TODO
22642264// - SDL_BindAudioStreams
@@ -2272,7 +2272,7 @@ extern fn SDL_CloseAudioDevice(AudioDeviceID) void;
22722272///
22732273/// If not bound, or invalid, this returns zero, which is not a valid device ID.
22742274pub const getAudioStreamDevice = SDL_GetAudioStreamDevice ;
2275- extern fn SDL_GetAudioStreamDevice (* AudioStream ) AudioDeviceID ;
2275+ extern fn SDL_GetAudioStreamDevice (* AudioStream ) AudioDeviceId ;
22762276
22772277// TODO
22782278// - SDL_CreateAudioStream
@@ -2413,11 +2413,11 @@ pub const AudioStreamCallback = *const fn (
24132413///
24142414/// Destroying the returned stream with SDL_DestroyAudioStream will also close
24152415/// the audio device associated with this stream.
2416- pub fn openAudioDeviceStream (device : AudioDeviceID , spec : * const AudioSpec , callback : ? AudioStreamCallback , userdata : * anyopaque ) Error ! * AudioStream {
2416+ pub fn openAudioDeviceStream (device : AudioDeviceId , spec : * const AudioSpec , callback : ? AudioStreamCallback , userdata : * anyopaque ) Error ! * AudioStream {
24172417 const maybe_stream = SDL_OpenAudioDeviceStream (device , spec , callback , userdata );
24182418 return if (maybe_stream ) | stream | stream else makeError ();
24192419}
2420- extern fn SDL_OpenAudioDeviceStream (AudioDeviceID , * const AudioSpec , ? AudioStreamCallback , * anyopaque ) ? * AudioStream ;
2420+ extern fn SDL_OpenAudioDeviceStream (AudioDeviceId , * const AudioSpec , ? AudioStreamCallback , * anyopaque ) ? * AudioStream ;
24212421
24222422// TODO
24232423// - SDL_AudioPostmixCallback
0 commit comments