faraklit
29-12-2008 13:04:31
I have wave files created by Audacity using default settings.
I can play them without problem if I do not use streaming.
But I need to play and pause sounds so I think stream is a must.
When I try playing sounds with streaming enabled, some of them make application crash while playing.
How can I trace and resolve the problem?
Thanks in advance.
stickymango
29-12-2008 23:36:59
Hi faraklit,
I don't see why you need to use streaming sounds if you are only playing/pausing sounds
Streaming sounds are primarily used for large sounds so they don't need loading into memory in one big chunk, playing/pausing sounds is irrelevant.
Anyway, are you using BOOST Threads? I know there are some serious, random crashes with the implementation of threads and the streaming classes in OgreAL, hence why I found it easier to re-write my own library. If you can, use static sounds.
I think there are a few bugs with streaming from what I remember, so your going to have to fix them yourself for now. I think there are a couple of posts where I highlighted some code changes to fix potential problems, maybe you can search for them.
Bottom line, use static sounds if you can, otherwise, if your using BOOST, check the mutex locking in the update functions, its likely a mutex is not being locked properly and some other code is accessing a list with invalid data causing a crash.
If your not using BOOST then check the streaming/buffer update functions.
HTH
reptor
30-12-2008 11:18:33
stickymango, you seem to know about OgreAL bugs.
Have you considered submitting a patch or patches to the OgreAL sourceforge patch tracker?
http://sourceforge.net/projects/ogreal/
It seems that the OgreAL project could be considered dead, if we look at the support it gets from its author nowadays.
Maybe a patch or two could give the needed push to keep the OgreAL project alive and more usable for people than what it currently is.
I'm thinking it would be a shame if you know even partially what is wrong in OgreAL and if that information is not stored at Sourceforge OgreAL pages.
faraklit
30-12-2008 16:32:53
hi stickymango,
thanks,
I tried pausing and playing sounds without streaming and all of them started from the beginning.
Pause is acting like Stop.
I looked at the samples and again same problem.
BasicDemo has two sounds one roar and one music. music is being streamed and pause works correctly. but roar sound stops when paused.
I am not using boost_threads.
I added some silence to the end of the problematic wav file but it crashed again almost at the end of the file.
Then I tried converting it to ogg and streaming it, this time it worked!
I do not know maybe it is a bug in Wave sound handler.
stickymango
31-12-2008 21:36:20
Ah yes, the pausing/restart bug, I remember coming across that, it was simple to correct but it eludes me at the moment. Maybe you could try out my lib, it should quickly integrate with your current code and will obviously be actively supported, otherwise I'll try and see if can remember how to correct it.
jacmoe
01-01-2009 02:46:46
stickymango, you seem to know about OgreAL bugs.
He does.
Because he created OgreOggSound more or less because OgreAL went dormant. AFAIK.
So check it out.