ISound::isFinished miss problem

Post your questions, suggestions and experiences regarding game design, integration of external libraries here. For irrEdit, irrXML and irrKlang, see the
ambiera forums
Post Reply
rocwood
Posts: 2
Joined: Sat Mar 31, 2007 2:17 am

ISound::isFinished miss problem

Post by rocwood »

Great and easy engine. I love irrKlang.

However, I get puzzled, ISound::isFinished miss problem. irrKlang 0.5/0.6, msvc2005/2005sp1

PROBLEM:
When a non-loop sound finished playback, the ISound::isFinished always return false. Instead, its getPlayPosition() return 0 and getIsPaused() return true. Does it a bug or I missing something?

How could I determine whether it finished while track ISound interface in offcial way ?

Thanks very much. :wink:


This is a part of my code:

ISoundEngine* engine = createIrrKlangDevice();
ISound* sound = engine->play2D("../../media/bell.wav", false, false, true); //no-loop, no-paused, enable tracking
while(!sound->isFinished()) {
// do something blocked here
}
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Strange, this should work. Going to check it. Maybe you could try out if it does work with the other sound output driver (specify another one via the first parameter when creating the sound engine)
Red Ghost
Posts: 3
Joined: Mon Apr 02, 2007 8:28 am

isFinished problem (continued)

Post by Red Ghost »

Hi,

I also have the problem but less frequently: isFinished will first return correctly twice or thrice and then will miss.

When switching to ESOD_WIN_MM driver, I have not reproduced the problem.

Hope that helps.

Red.

[EDIT after a-sennov research] In my own situation, there is only one sound replayed each time it is finished. This is not reproduced with ESOD_WIN_MM driver.
Last edited by Red Ghost on Tue Apr 10, 2007 10:58 am, edited 1 time in total.
a-sennov
Posts: 1
Joined: Sun Apr 08, 2007 10:05 am

Post by a-sennov »

Hi,

[Edit]
After some investigation it seems that if there are several concurrently playing sounds then only the one that was started last reports isFinished properly, others become "hanged".

[Edit 2] :-)
The above is valid for ESOD_DIRECT_SOUND. ESOD_WIN_MM seems to work correctly.

Maybe this will help,
Anatoly.
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Ah, thanks for the details. Going to take a look at it. Maybe I should set win mm as default driver :)
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Update: The bug has been fixed in irrKlang 0.7. Hope it works for you now.
Post Reply