MusicSharp icon indicating copy to clipboard operation
MusicSharp copied to clipboard

Player crashes when web playback is stopped

Open markjamesm opened this issue 11 months ago • 2 comments

Currently, the player crashes whenever a file is loaded during or after a stream is played.

Steps to Replicate

  • Open an MP3 stream (you can use this Soma.fm stream to test).
  • Press stop button to stop the stream from playing.
  • The player will crash.

Stack Trace:

System.InvalidOperationException: Seeking is not supported for this sound.
   at SoundFlow.Components.SoundPlayer.Seek(Int32 sampleOffset)
   at SoundFlow.Components.SoundPlayer.Stop()
   at MusicSharp.AudioPlayer.SoundFlowPlayer.Play(Stream stream) in /MusicSharp/src/AudioPlayer/SoundFlowPlayer.cs:line 30

It appears that the error is due to the SoundFlow library's Stop() method running in the AudioEngine class. According to the SoundFlow library documentation, Stop() should work for web playback.

markjamesm avatar Mar 12 '25 23:03 markjamesm

I've opened an issue in the SoundFlow repository for this as it appears to be a bug in the SoundFlow library itself.

markjamesm avatar Mar 12 '25 23:03 markjamesm

After speaking with the SoundFlow developer, this issue should be resolved when the next version of the SoundFlow library is released.

markjamesm avatar Mar 25 '25 01:03 markjamesm

This bug was resolved in SoundFlow version 1.0.4. I've updated the library to 1.1.1 today and so I can mark this issue as closed.

markjamesm avatar Jul 14 '25 02:07 markjamesm