Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Hi everybody, I have just found your Sound engine today, and I very appreciate it, he have really changing my life ( at less for today :P ). And I have a little question for this evening, I seek a solution which would enable me to choose in "real time" the output sound device for the current playback. I clarify my demand : When I launch ISoundEngine to play a file ( *mp3 in 2D ,.... etc) through a specific output device ( first available for example ), I would like to change the device without lose position in my current file. After a strong brainstorming with me and myself, I found some beginning solution, but nothing really run. The difficulty for this function comes to the fact what when we would change the device, no function is usable. And we are obliged to destroy and recreate an ISoundEngine object, but we lose the seek position in file. Someone have a solution in its basket ? I take every all ideas. Thx and sorry for the bad english but I'm French ...... I know ... I know ...... :P |
||||
|
What about getting the seek position of the playing file, destroying the engine, recreating it with the new sound driver, starting the old played file paused, setting the old seek position and unpausing the sound? |
||||
|
[quote=erik (Guest)]What about getting the seek position of the playing file,[/quote] Maybe I'm mistaken, but he don't exist a propertie or method to get the current position. [quote=erik (Guest)] destroying the engine, recreating it with the new sound driver, starting the old played file paused, setting the old seek position and unpausing the sound?[/quote] And if you destroy the ISoundEngine, you destroy the old played file too, because the file is binding to ISoundSource to ISoundEngine. Thank for the reply |
||||
|
Of course there is a method for getting the play position: [url=http://www.ambiera.com/irrklang/docu/classirrklang_1_1_i_sound.html#d8edf019757e44c683b14424abc2275c]getPlayPosition[/url] |
||||
|
Indeeds, I don't see this propertie in class ISound , thanks a lot Erik. Here is my source code for the solution :
If you are any questions or improvements .... post it |
|