Issues with ISound (irrKlang 0.6 win32 gcc)

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
Red Ghost
Posts: 3
Joined: Mon Apr 02, 2007 8:28 am

Issues with ISound (irrKlang 0.6 win32 gcc)

Post by Red Ghost »

Hi,
I have two issues regarding ISound (irrKlang 0.6 win32 gcc):

1- (minor) when a sound is paused, getPlayPosition still increments: the time counter is independant of the sound.

2- (major) I am missing two kinds of callback events for ISound:
- End of sound callback event to avoid unnecessary polling with isFinished.
- Timing callback event to synchronize a Gfx effect with a sound (read music here): e.g. execute callback function when the sound reached play position X.
To my mind, a simple function callback would suffice with a void pointer as single parameter to empower the user to pass client data.

To solve both issues in my development I have derived my own workaround but it is less precise. If you do not have much time, I propose to process the minor issue first as this will increase the precision of my derived workaround for callbacks.

Thank you in advance.

[Edit: whoops, I have missed the post regarding events in irrKlang where niko already answered it was planned.]
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Thanks for posting, the events are planned, and yes, the playback position issue is a known problem, going to fix this soon.
Red Ghost
Posts: 3
Joined: Mon Apr 02, 2007 8:28 am

Post by Red Ghost »

Still on the problem of getPlayPosition, the behavior is not the same between the DirectSound driver and WinMM driver.

Under the WinMM driver, getPlayPosition never goes above 98000 ms: it resets back to 0 eventhough the sound lasts more than 98000ms.

Note that the sound plays correctly but the playposition counter is not correctly updated during the sound play.

When the sound is looped, the play position counter is correctly reset wether the sound lasts more than 98000 ms or not.

Thanks.

Red.

[EDIT: added better description of the problem.]
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Everything is fixed in irrKlang 0.7 now. Hope it helps. The events will be implemented in a future release of the library.
Post Reply