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
. How can I get a resource soundfile to play?
Thanx.
[419 byte] By [
csgary] at [2007-12-17]
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