cannot get audio file to play with my.computer.audio.play

I am trying to play an audio file I added to resources. When I type in

my.computer.audio.play(My.Resources.filename)

it gives me the blue squiggly underline, and says that "Value of type 'System.IO.UnmannagedMemoryStream' cannot be converted to 'String'. This is highly annoying Tongue Tied. How can I get a resource soundfile to play

Thanx.


Answer this question

cannot get audio file to play with my.computer.audio.play

  • Philip Stuyck

    Works great. Thanks!
  • JBeem

    there are a couple of difference options with the my.computer.audio.play method (see this for more details). The only overload with a single parameter expects a filename, not a stream, so you'll have to add a playmode argument such as AudioPlayMode.Background if you're using data or a stream.

    Cathal

  • cannot get audio file to play with my.computer.audio.play