Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        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));
        }
Ejemplo n.º 3
0
 public static bool PlaySound(byte[] data, SoundFlags flags)
 {
     return(WinMM.PlaySound(data, UIntPtr.Zero,
                            (uint)(flags | SoundFlags.Resource)));
 }
Ejemplo n.º 4
0
 public static bool PlaySound(string filename, SoundFlags flags)
 {
     return(WinMM.PlaySound(filename, UIntPtr.Zero,
                            (uint)(flags | SoundFlags.Filename)));
 }