I'm attempting to simply load a Music asset using libgdx, and this is what I have:
Music main_background;
main_background = Gdx.audio.newMusic(Gdx.files.internal("data/music/main_bg.wav"));
This code is exactly the same code as they have in the small tutorial of "Making a game" with libgdx, and I'm trying to load my own sound that I have made (Using GarageBand, in case that matters). Whenever I try running this as a Desktop application, I get a bunch of errors:
Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: Error creating music com.badlogic.gdx.backends.openal.Wav$Music for file: data/music/main_bg.wav
Caused by: java.lang.reflect.InvocationTargetException
Caused by: com.badlogic.gdx.utils.GdxRuntimeException: Error reading WAV file: data/music/main_bg.wav
Caused by: com.badlogic.gdx.utils.GdxRuntimeException: RIFF header not found: data/music/main_bg.wav
I'm not sure what the problem could be, because the audio file isn't corrupt (because I can listen to it perfectly fine) yet I can't find information anywhere about people getting this type of error when loading an asset.
I have a bunch of Texture's loaded just fine, but for some unknown reason I can't load a Music asset (and for the record, I tried loading the same file as a Sound asset and get essentially the same error).
Has anyone come across this before or have any ideas on what could be wrong?
EDIT: I should mention I also get this error if I try loading an mp3 or ogg file as well, it doesn't just happen with a wav