Reputation: 16598
I have a recording that has some unuseful voices at the beginning, and at the end. How can I play just the middle part of the sound?
I have AL_SEC_OFFSET, that is suitable for the entry point, I already use it, but what about the endpoint?
Is there any smart OpenAL settings for this? Hopeso.
Thanks.
Upvotes: 2
Views: 318
Reputation: 14974
OpenAL doesn't have built-in support for stopping playback at a specific sample point. A timer is your best bet in this case, even though it will be somewhat inaccurate.
If you want sample-perfect stopping, you could just load the middle part of the audio file into an ALBuffer rather than the entire thing. I have some code which does that here:
Upvotes: 0
Reputation: 16598
There could be a workaround that fires a timer that stops playing before end. Any simplier?
Upvotes: 1