Re: SDL2 and Sound

new topic     » goto parent     » topic index » view thread      » older message » newer message
ChrisB said...

Hi Andy

Can't see a simple way to play a sound, would expect something like (pseudocode, and a bare minimum)

ptr = load_sound_file("sound file") 
play_sound(ptr) 
pause / volume / locate (ptr) 
unload_sound(ptr) 

What you have in euSDL2 doesn't look like the SDL2 docs, or it does in some places, so I'm having difficulty referencing what I think are the legacy SDL sound functions with the current SDL (2.07 +) SDL sound functions.

Do you have any examples for performing the most basic sound functions using euSDL2?

Cheers

Chris

I don't have any examples of sound using SDL 2's built in sound. SDL 2's built in sound functions are cumbersome and I tried to wrap them best I could. I think your best bet would be to use SDL2 Mixer for sound. I plan to remake that wrapper with Greg's FFI library in the near future. I already re-wrote SDL 2 using the FFI library, so that it could better handle structs.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu