The opinions expressed herein are my own personal opinions. They are not necessarily fact or sactioned by any other person or organization. If you disagree that's your right. It's also my right to not care.
© Copyright 2009, Chris Tacke
I was playing around with PlaySound today (no pun intended) and was kind of surprised to find that I could play an embedded resource wave file with one line of code (well one line past the P/Invoke declaration):
using
....
// P/Invoke declarations....
[Flags]
...
PlaySound(((MemoryStream)Assembly.GetExecutingAssembly( ).GetManifestResourceStream( "AudioTest.tada.wav")).GetBuffer(), IntPtr.Zero, SoundFlags.Synchronous | SoundFlags.Memory);
Remember Me