TGEA 1.7.0 Bug: intermittent SFX preload errors
by Jeff Faust · in Torque Game Engine Advanced · 04/07/2008 (9:43 am) · 27 replies
I'm still trying to discover additional information about this, but what I'm observing is intermittent SFX preload errors on certain sounds. The errors are of the form:
SFXProfile(CrossbowFireSound)::onAdd: The preload failed!
While the error seems to be reported consistently for certain files (both of the ones I see are in ogg format), the errors are inconsistent from load to load. Sometimes there are no errors and the audio files will play. Other times the preload errors occur and the sounds won't play. It's possible to get preload errors on the first mission load, exit the mission, then reload the same mission without exiting the app, and get no errors and the sounds will then play.
When the errors do occur they appear to result from a SFXResource::load() call returning NULL.
SFXProfile(CrossbowFireSound)::onAdd: The preload failed!
While the error seems to be reported consistently for certain files (both of the ones I see are in ogg format), the errors are inconsistent from load to load. Sometimes there are no errors and the audio files will play. Other times the preload errors occur and the sounds won't play. It's possible to get preload errors on the first mission load, exit the mission, then reload the same mission without exiting the app, and get no errors and the sounds will then play.
When the errors do occur they appear to result from a SFXResource::load() call returning NULL.
About the author
Recent Threads
#22
(I don't know if Vorbis supports loop markers, sorry.)
The file is just a regular 44100khz, mono, 16-bit sound. Nothing extra in it, just a comment field. But I got comment fields in other sounds as well, and they work.
I've gone back to our old loader, there's too much code in TGEA's VorbisStream that I don't understand and the "paramedics" type comments don't help me a whole deal to get around. :)
However, I'll email you the ogg file I was using. Good luck.
06/09/2008 (10:35 am)
Hi Tom, nice to see you around.(I don't know if Vorbis supports loop markers, sorry.)
The file is just a regular 44100khz, mono, 16-bit sound. Nothing extra in it, just a comment field. But I got comment fields in other sounds as well, and they work.
I've gone back to our old loader, there's too much code in TGEA's VorbisStream that I don't understand and the "paramedics" type comments don't help me a whole deal to get around. :)
However, I'll email you the ogg file I was using. Good luck.
#23
So far it seems like its a file format incompatibility in the vorbis loader in Torque. The vorbis loader in Torque is a modified version of the vorbisfile.c/h from the stock vorbis lib circa 2001. It seems either the old loader is incompatible with some files or a bug was introduced in the modifications done to make a C++ class out of it.
Although we could spend time hacking the existing loader, it seems to me that its not the right thing to do. Instead i will update to the latest version of the vorbis lib and the stock vorbisfile loader. When its up and running i'll post a zip with the changes here for people to test.
If all goes well this will make it into the next TGEA update.
06/09/2008 (11:43 am)
Ok... Stefan sent me a file and i can reproduce the issue every time.So far it seems like its a file format incompatibility in the vorbis loader in Torque. The vorbis loader in Torque is a modified version of the vorbisfile.c/h from the stock vorbis lib circa 2001. It seems either the old loader is incompatible with some files or a bug was introduced in the modifications done to make a C++ class out of it.
Although we could spend time hacking the existing loader, it seems to me that its not the right thing to do. Instead i will update to the latest version of the vorbis lib and the stock vorbisfile loader. When its up and running i'll post a zip with the changes here for people to test.
If all goes well this will make it into the next TGEA update.
#24
For some reason, SFX does not like MONO tracks, so I made my clips:
Stereo
44100 Hz
16-bit PCM
SFX will read the 2 channels fine and works with:
Preload set to true or false.
isLooping set to true or false.
Hope that helps a little,
Cheers
10/05/2008 (9:23 pm)
With a little playing around I was able to find a quick fix for playing short audio clips...For some reason, SFX does not like MONO tracks, so I made my clips:
Stereo
44100 Hz
16-bit PCM
SFX will read the 2 channels fine and works with:
Preload set to true or false.
isLooping set to true or false.
Hope that helps a little,
Cheers
#25
Anyone that had issues in 1.7 should check out 1.8.
11/20/2008 (9:05 am)
FYI.... TGEA 1.8 beta 1 is out and it includes the new loader that uses the latest OggVorbis_File library. It sould solve all preload errors with ogg files.Anyone that had issues in 1.7 should check out 1.8.
#26
When I load short ogg files (00:01 sec) sounds was allright and I heard all sounds. But when I reopen the mission or game I got preload failed error and now there is no sound.
What can I do to solve this problem. How can I hear the sounds like old mission.
Thanks...
05/10/2009 (7:42 am)
I'm a TGEA 1.8.1 user.When I load short ogg files (00:01 sec) sounds was allright and I heard all sounds. But when I reopen the mission or game I got preload failed error and now there is no sound.
What can I do to solve this problem. How can I hear the sounds like old mission.
Thanks...
#27
moved to its own thread in case its a different issue
http://www.torquepowered.com/community/forums/viewthread/114649
04/29/2010 (6:02 am)
this is still an issue for in stock 1.8.2moved to its own thread in case its a different issue
http://www.torquepowered.com/community/forums/viewthread/114649
Associate Tom Spilman
Sickhead Games
Grabbing at straws here.. does ogg supports loop markers? I wonder if a loop marker is causing it to decode endlessly.