Skip to content

System.InvalidOperationException thrown when Stop() is called during web playback #16

@markjamesm

Description

@markjamesm

When attempting to call the Stop() method while a web stream is playing, an exception is thrown:

Unhandled exception. System.InvalidOperationException: Seeking is not supported for this sound.

Stack Trace

Playing stream... Press any key to stop.
Unhandled exception. System.InvalidOperationException: Seeking is not supported for this sound.
   at SoundFlow.Components.SoundPlayer.Seek(Int32 sampleOffset)
   at SoundFlow.Components.SoundPlayer.Stop()
   at WebPlayback.Program.Main(String[] args) in /SoundFlow Test/QuickTest/Program.cs:line 36
   at WebPlayback.Program.<Main>(String[] args)

Minimum reproducible example

  • Use the web playback example from the SoundFlow documentation.
  • Replace your-audio-stream-url with http://ice6.somafm.com/sonicuniverse-128-mp3 (Soma.fm online radio stream)
  • Run the code, and once you press a key to stop the stream, the exception will throw.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions