Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error when sounds are missing
03-28-2009, 01:45 AM,
Error when sounds are missing
I have just compiled and run the latest svn version of vdrift. All goes good, but I haven't downloaded the svn version of the data - am just using the data that came with the version I installed on fedora 10 (version 2009-03-09-full). I am unable to actually play the game, because this version does not have all the sound files that are required by the svn version. The game loads the whole track and vehicle, and then goes back to the main menu with a message saying
ERROR: Can't load bump sound: 0
ERROR: Error loading car: G4
Wouldn't it be better to try loading the sound files for the vehicle, and if the sound is unavailable, just not use that sound at all rather than "crashing" back to the main menu? I notice that there is no option to actually turn the sound off in the game, only turn it right down, but wouldn't it better to be able to turn the sound off and not need to load any of the sound files? I know that I for one, don't always play with sound, and if this also helped to speed up the load time, I think that would be pretty cool.
03-28-2009, 10:17 PM,
Re: Error when sounds are missing
You can get the bump sounds from here:

Just put them in your data/sounds folder.

a_m0d Wrote:Wouldn't it be better to try loading the sound files for the vehicle, and if the sound is unavailable, just not use that sound at all rather than "crashing" back to the main menu?

Well, at least it doesn't segfault. :-)

If you run with the "-nosound" argument it will disable all sound and I believe that will prevent it from trying to load those sounds at all, but I haven't tried it.
03-29-2009, 07:38 PM,
Quote:Well, at least it doesn't segfault. Smile
LOL - I tried to run it with -nosound and got the following segfault:
INFO: Car loading was successful: G4
vdrift: include/sound.h:208: void SOUNDSOURCE::Reset(): Assertion `buffer' failed.
SIGABRT detected, releasing the mouse
Segmentation fault
03-30-2009, 10:25 AM,
Hmm, looks like it segfaulted when trying to clean up after the assertion failed. The assertion failed because something was trying to use sound even though it was disabled. I'll look into that.

Have you tried downloading the data files yet?
03-31-2009, 07:46 AM,
Yes, that seems to work quite fine now. Thanks for that. I had a look at the include file where the assertion is, and it seems like it is asserting that a buffer exists before seeking to the beginning of the sound. So either Reset() should check whether the buffer exists before reseting (which in a way it is with the assert) or else no sound functions should be called when the sound is disabled.
03-31-2009, 08:40 PM,
I've updated the assert inside Reset in the latest SVN, as there's no reason to check whether or not the soundbuffer exits if the buffer position is just getting reset to zero. I was able to run with -nosound without any problems, but I have all of the sounds. I dunno if you want to try it out and see if there's going to be another assert/segfault somewhere else or just call it good enough now that you have the sounds working.
03-31-2009, 10:06 PM,
Yeah, that will do - it was segfaulting on my system even when I had the sounds installed, so I think it should be alright now. However, I did not see the change in the latest revision in the trunk - maybe you haven't committed it yet?
04-01-2009, 03:30 PM,
The change was in R2391:
04-01-2009, 05:47 PM,
Yup, that's what the log message says, but I updated to that revision and didn't get the change. Moreover, when browsing that revision on the net, I don't see the change either - Strange!
04-02-2009, 10:04 AM,
Um, try R2393. Previously I only removed the call to SeekToSample (which has an assert in it) and forgot to actually remove the glaringly obvious assert in Reset().
04-02-2009, 05:52 PM,
Yup - all fixed now. Thanks for that.

Forum Jump:

Users browsing this thread: 1 Guest(s)