public static bool PlaySound(byte[] data, bool syncron, bool loop) { SoundFlags flags = SoundFlags.Resource; if (syncron) { flags |= SoundFlags.Syncron; } else { flags |= SoundFlags.Asyncron; } if (loop) { flags |= SoundFlags.Loop; } return(WinMM.PlaySound(data, UIntPtr.Zero, (uint)flags)); }
public static bool PlaySound(string filename, bool syncron, bool loop) { SoundFlags flags = SoundFlags.Filename; if (syncron) { flags |= SoundFlags.Syncron; } else { flags |= SoundFlags.Asyncron; } if (loop) { flags |= SoundFlags.Loop; } return(WinMM.PlaySound(filename, UIntPtr.Zero, (uint)flags)); }
public static bool PlaySound(byte[] data, SoundFlags flags) { return(WinMM.PlaySound(data, UIntPtr.Zero, (uint)(flags | SoundFlags.Resource))); }
public static bool PlaySound(string filename, SoundFlags flags) { return(WinMM.PlaySound(filename, UIntPtr.Zero, (uint)(flags | SoundFlags.Filename))); }