locked
cannot get audio file to play with my.computer.audio.play RRS feed

  • Question

  • 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.
    Thursday, December 8, 2005 12:36 AM

Answers

  • 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
    Thursday, December 8, 2005 2:38 AM

All replies

  • 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
    Thursday, December 8, 2005 2:38 AM
  • Works great. Thanks!
    Thursday, December 8, 2005 5:10 PM