SimpleDirectMediaLayer.jl icon indicating copy to clipboard operation
SimpleDirectMediaLayer.jl copied to clipboard

Audio Example does not work

Open mpeters2 opened this issue 2 years ago • 0 comments

It gives me the following error:

ERROR: /Users/SomeGuysAccount/Documents/Development/Julia/SDL_Beeper/audio_example/beat.wav not found.

but if I insert the first three lines below...

if isfile("$aud_files/beat.wav")
	println("FOUND beat.wave AUDIO FILE!!!!!!!!!!!")
end

music = Mix_LoadMUS("$aud_files/beat.wav")

if (music == C_NULL)
    println(">>>", unsafe_string(SDL_GetError() ) )
    error("$aud_files/beat.wav not found.")
end

It prints FOUND beat.wave AUDIO FILE!!!!!!!!!!!, yet in the debugger, it shows the variable music as having a NULL pointer. In addition, I can successfully play the beat.wav file in the Finder, but when I print the SDL_GetError, I get Unrecognized audio format.

mpeters2 avatar Feb 02 '24 21:02 mpeters2