c++ cli - How do I convert a System::IO::Stream^ to an LPCSTR for PlaySound? -
I am trying to embed in a C ++ / CLI app and then return the .wav file, but In all instances, I have seen that the use of PlaySound
is in VB I can not see how toa stream ^
transmits up to LPCIR which requires PlaySound:
System :: IO :: stream ^ s = Assembly :: GetExecutingAssembly () - & gt; GetManifestResourceStream ("Ping .wave"); LPCRRB = S-> Line Place (buff, null, s nd_async | sND_MEMORY | SND_NOWAIT);
I think I need some kind of awesome .net memory conversion magic.
Instead use the System :: Media :: Sound Player class. It has the property of a stream, specify your "s" variable, then call the Play () method.
Comments
Post a Comment