Error when sounds are missing - a_m0d - 03-28-2009
Hi,
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 Code: 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.
Re: Error when sounds are missing - joevenzon - 03-28-2009
You can get the bump sounds from here:
http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/sounds/
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.
- a_m0d - 03-29-2009
Quote:Well, at least it doesn't segfault.
LOL - I tried to run it with -nosound and got the following segfault:
Code: INFO: Car loading was successful: G4
vdrift: include/sound.h:208: void SOUNDSOURCE::Reset(): Assertion `buffer' failed.
SIGABRT detected, releasing the mouse
Segmentation fault
- joevenzon - 03-30-2009
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?
- a_m0d - 03-31-2009
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.
- joevenzon - 03-31-2009
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.
- a_m0d - 03-31-2009
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?
- joevenzon - 04-01-2009
The change was in R2391:
http://svn.vdrift.net/viewvc.cgi?view=rev&root=VDrift&revision=2391
- a_m0d - 04-01-2009
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!
- joevenzon - 04-02-2009
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().
- a_m0d - 04-02-2009
Yup - all fixed now. Thanks for that.
|