Sound Error

BlitzMax Forums/BlitzMax Programming/Sound Error

Cruis.In(Posted 2014) [#1]
Hi guys, anyone ever come across this before?

Building thegamecollision
Linking:thegamecollision.exe
Executing:thegamecollision.exe
CreateSoundBuffer failed (14)
Process complete

I just loaded some three additional tracks to the game. It only gives this error sometimes, when compiling.

Global SpaceFlightMusic:TSound = LoadSound("music/Spaceflight.ogg", True)

Global Exploration1Music:TSound = LoadSound("music/Exploration1 - michael trillions.ogg", True)

Global Exploration2Music:TSound = LoadSound("music/Exploration2 - michael trillions.ogg", True)

An error with one of the files? I noticed before spaceflight.ogg would quit with that error when I tried to play it. But not now since I shortened the name.

That's all I added.


Midimaster(Posted 2014) [#2]
Don't know... But I would try to do the same with the other two names... SPACES or "-" could perhaps caused the problem? So use "explo1.ogg" and "explo2.ogg"


Derron(Posted 2014) [#3]
If you are on linux the filenames are case-sensitive.


Use this to check if a file exists:
if filetype("music/Exploration2 - michael trilions.ogg") = 0 then print "file not found"


Keep in mind: if the error comes during compilation: it is a source code error. If the error comes on execution EVERYTIME - it is potentially a flaw in the code you use.
You said "error sometimes" - so this wont be a "file does not exist" problem.
"Sometimes" even means that it is no "ogg decoding problem" (which I thought of the first). To check this: try to use 2 other sound files (you can call it the same).


All in All: try to build in in "debug mode" - so you can traversal-back the calls and check how the error is created.


bye
Ron


Cruis.In(Posted 2014) [#4]
hi guys thanks. I am going to try each combination and report back..! :)