Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static class Core
- {
- public static void Mute()
- {
- uint num = 0;
- Core.waveOutGetVolume(IntPtr.Zero, out num);
- Core.waveOutSetVolume(IntPtr.Zero, 0);
- IsolatedStorageSettings.ApplicationSettings.AddOrUpdateValue("volume", num);
- }
- public static void UnMute()
- {
- if (IsolatedStorageSettings.ApplicationSettings.Contains("volume"))
- {
- uint item = (uint)IsolatedStorageSettings.ApplicationSettings["volume"];
- Core.waveOutSetVolume(IntPtr.Zero, item);
- }
- }
- [DllImport("coredll.dll", CharSet=CharSet.None)]
- private static extern int waveOutGetVolume(IntPtr device, out uint volume);
- [DllImport("coredll.dll", CharSet=CharSet.None)]
- private static extern int waveOutSetVolume(IntPtr device, uint volume);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement