Sound crashes when a sceneNode is rotated

kintaro

27-02-2007 14:16:40

Well, I have a strange problem with sound of ogreAl and my scene.

I am using oSceneLoader and oFusion for my scenes, and I load a character manually.

My character walk in the scene, rotate, every thing is ok, the background music plays very well till here.

I work with multiple scene managers, and when I call a scene, the character appear over a check point that comes with the scene file.

My problem occurs when I rotate manually in the code some check point, and when the program is running and in the moment that I call the scene that the check point was rotated, the background music stops, the program continue to run but the music does not play anymore.

I putted a button to play and stop the background music, it works very well, when the music stops because of a manully rotate check point, if I hit the button to play the music again and so the program crashes, stops to run.

Interisting that this problem only happens when I modify the orientation of check point, if translate it or turn it invisible, the background music do not stops anytime.

And if I stop (stop, not pause) the background music before call the scene that has a manually rotated check point, call this scene and than hit the button to play music again, the music plays without problems. After it, I can call this scene anytime I want, without have to stop the music before, because the music does not crashes.

Yes, I can solve this problem by rotating the check point in 3D max than rotating it manually in the program code, but I though that would be nice to report this problem, maybe it helps to improve ogreAl.

CaseyB

27-02-2007 14:44:17

I do appreciate the report. Let me see if I understand the situation. You have a background sound, then when you rotate a check point the music stops. Then when you try to play it again your app crashes. If you stop the music before you rotate the check point then start it again everything is fine.

Is it attached to a node or just free floating? Are there more than one check point? Does it happen if you rotate a different node? Where is the listener attached? Can you run it in debug and see where it crashes?

kintaro

27-02-2007 15:45:17

Thanks very much for your fast reply CaseyB.

There are more than one check point, the music crashes just with the ones that I manually rotate.

Well, in this case I rotate the check point previously in the program code, this is, before run the program.

This occurred because we had a problem with orientation of check points during modeling time in 3D max, just for earn time, I rotate two of the check points in the program code.

As check points I use a simple small box that I turn it invisible. They are attached to sceneNodes.

The music also crashes when I link the viewport to an animated camera.

I couldn't see where in ogre log appears this crashes, but it is below. One thing is that just in debug mode, it gives an exception message, but the program runs.

The listener is attached to characterNode.

12:25:15: *-*-* OgreAL Initialization
12:25:15: MovableObjectFactory for type 'OgreAL_Sound' registered.
12:25:15: MovableObjectFactory for type 'OgreAL_Listener' registered.
12:25:15: *-*-* Creating OpenAL
12:25:15: OpenAL Devices: Generic Software, Generic Software,
12:25:16: Choosing: Generic Software
12:25:16: Supported Formats
12:25:16: -----------------
12:25:16: * AL_FORMAT_MONO16, Monophonic Sound
12:25:16: * AL_FORMAT_STEREO16, Stereo Sound
12:25:16: * AL_FORMAT_QUAD16, 4 Channel Sound
12:25:16: * AL_FORMAT_51CHN16, 5.1 Surround Sound
12:25:16: * AL_FORMAT_61CHN16, 6.1 Surround Sound
12:25:16: * AL_FORMAT_71CHN16, 7.1 Surround Sound
12:25:16: EAX 2.0 Detected


Well, of ogreAl it is just that appears in ogre log, even when the problem happens.

CaseyB

27-02-2007 16:31:00

Are there any sounds attached to the nodes you are rotating?

Also, it looks like your Ogre.log got cut off, too long I guess, could you post just the OgreAL section please?

kintaro

27-02-2007 17:38:30

The check points doesn't has sound attached to them.

I will edit my previous reply, to show only ogreAl section.

kintaro

07-03-2007 20:06:45

Hey CaseyB, I would like to know if you find what could be causing the music crash.

In another topic that I post:

http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=3516

Getting the current music time I can stops the music do change scene and so play the music again but I time position that it was stopped.

Did already you added this feature to ogreAl?

Thanks for your help.

CaseyB

07-03-2007 20:19:25

No, I can't imagine what it could be. If you are rotating something that has no sound to it, I can't imagine why that would cause OgreAL to crash. Is that all the log file said? Did it show an error? I have not yet added the code for seeking, or getting the time. I am going to look into that this weekend.

kintaro

09-03-2007 18:26:22

Nope, in log there is no error related to ogreAl. Well, I think that the feature of code seeking will help me to solve this problem, since if I stop the music and get its time position, change scene, and than play music again from where it stopped, it will work.

I really appreciate your help developping this seeking feature.

Thanks again.