-
Notifications
You must be signed in to change notification settings - Fork 33
How the virtual-channel is played? #1
Comments
Let me make sure I understand the question: You have a 10 second long sound loaded, and you play it. Then you stop the sound 4 seconds in. Once the sound it stopped it loses its position. Playing a new sound (even if its the same sound) will start again at the beginning. If you want to start it from the 4 second mark where you left off, you need to pause the sound instead. |
@alexames thx for your reply. The sound is not stoped by me, it's stoped by pindrop. I see some code as follows. these code will stop low priority channel and assign it's real-channel to a higher priority channel.
|
Yeah, if you have too many sounds playing at once it will stop playing the lowest priority sounds. I believe in the sample file I have the number of channels set relatively low, but it could realistically be pretty large (how large depends on how much other work your app is doing - you'll have to profile to figure out the right balance). Right now the underlying library used to mix the audio (SDL_mixer) doesn't have the ability to play a sound starting from a certain timestamp, so when a sound begins playing again it will just start from the beginning rather than from where it should. |
@alexames Got it. |
if a SoundCollection(about 10s long) is assigned to a virtual-channel (at time 0s), after a while ... until 4s, now a real-channel is free to use. How pindrop play it ? it'll be played from start or played from the audio's 4/10 position ?
The text was updated successfully, but these errors were encountered: