Class WinMm
Windows Mulit-Media API
Inheritance
System.Object
WinMm
Namespace: Dapplo.Windows.Multimedia
Assembly: Dapplo.Windows.Multimedia.dll
Syntax
public static class WinMm : object
Methods
| Improve this Doc View SourcePlay(IntPtr, SoundSettings)
Play a wav from memorySetLastError
Declaration
public static void Play(IntPtr memoryPtr, SoundSettings settings)
Parameters
Type | Name | Description |
---|---|---|
IntPtr | memoryPtr | Pointer to the wav file to play |
SoundSettings | settings | SoundSettings |
Play(Byte[])
Play wave data Note: The byte[] should be pinned into memory, and cannot be removed while playing!! See PlaySound(xxx, SND_MEMORY | SND_ASYNC) is almost always a bad idea.
Declaration
public static void Play(byte[] soundBytes)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | soundBytes | Wave data to play to play |
Play(String)
Play a resource
Declaration
public static void Play(string resource)
Parameters
Type | Name | Description |
---|---|---|
System.String | resource | Resource to play |
PlaySystemSound(SystemSounds)
Play a system sound
Declaration
public static void PlaySystemSound(SystemSounds systemSound)
Parameters
Type | Name | Description |
---|---|---|
SystemSounds | systemSound | Value from the SystemSounds enum |
StopPlaying()
Stop playing
Declaration
public static void StopPlaying()