|
Reversed audio |
Aldrik
Member #16,925
December 2018
|
Is there any example available for playing a sample and audio stream in reverse? |
Edgar Reynaldo
Major Reynaldo
May 2007
|
No, and that's kind of questionable whether it can be done currently. You might have luck with ALLEGRO_PLAYMODE_BIDIR and al_set_sample_instance_position but I don't know if seeking to the second half of the bidirectional position is possible. Somebody else might know more on #allegro on IRC on freenode. Not really my subject of expertise. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Aldrik
Member #16,925
December 2018
|
I managed to get something to work by setting the sample instance speed to -1.0f and setting the position to the end of the sample but it has some weird side effects. I will try what Edgar Reynaldo said and see if that has better results. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
That probably played it in reversed forward fragments, is my guess. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
roger levy
Member #2,513
July 2002
|
I'd like to know what works. I guess if there's no way to do it right now you could create a reverse version of the sample ... |
Aldrik
Member #16,925
December 2018
|
In my game I am implementing rewind, I am storing the position of the sample instance every tick and set the position every tick when rewinding (60 FPS). I also set the sample instance speed to -1.0f. It doesn't work flawlessly but I think I can work around it. I attached a video displaying the results. |
|