FreeStreamer icon indicating copy to clipboard operation
FreeStreamer copied to clipboard

FSAudioStream Persists if attempt made to stop/pause while buffering

Open humayunharoon opened this issue 8 years ago • 1 comments

I am using FSAudioStream directly and maintain a single strong reference to it. When a user selects another song, i check if the stream is playing, and if so i 'pause' it, and then i call 'stop', after that i allocate a new instance of FSAudioStream. This works fine, but if the user quickly selects songs back to back (for examples press next two times), the songs which were in a buffering state while switching, begin playing overlapped with the current song.

  1. Song One (Playing) Action: Tap Next
  2. Song Two begins buffering Action: Tap Next (while Song two is still buffering)
  3. Song Three, buffers and plays, and song two will now as well begin playing on top of this.

Is there anyway to cancel a song from playing when its in the buffer state? Maybe i over-looked it but i couldn't find any method.

humayunharoon avatar Dec 08 '16 12:12 humayunharoon

I think currently there is no way to pause or cancel stream while in buffering state!!!

current behaviour work like scheduling (schedule playing on 'play()') but no way to cancel this scheduled "play", if you are in initial buffering state

@muhku try to reply

satishVekariya avatar Jan 29 '20 06:01 satishVekariya