Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
3.0 KiB

  1. typedef enum
  2. {
  3. sndvolNotChecked,
  4. sndvolNotPresent,
  5. sndvolPresent,
  6. } enumSndVol;
  7. #define MAXMIXERLEN 256 // Maximum output string length
  8. // Prototypes
  9. STDAPI_(void) Multichannel (HWND hWnd, UINT uiMixID, DWORD dwDest, DWORD dwVolID);
  10. BOOL OnInitDialog (HWND hDlg, HWND hwndFocus, LPARAM lParam);
  11. void OnDestroy (HWND hDlg);
  12. void OnNotify (HWND hDlg, LPNMHDR pnmh);
  13. void InitVolume (HWND hDlg);
  14. BOOL PASCAL OnCommand (HWND hDlg, int id, HWND hwndCtl, UINT codeNotify);
  15. BOOL SndVolPresent ();
  16. void MasterVolumeConfig (HWND hWnd, UINT* puiMixID);
  17. BOOL SearchDevice (DWORD dwMixID, LPDWORD pdwDest, LPDWORD pdwVolID, LPDWORD pdwMuteID);
  18. void SearchControls(int mxid, LPMIXERLINE pml, LPDWORD pdwVolID, LPDWORD pdwMuteID, BOOL *pfFound);
  19. void DisplayVolumeControl (HWND hDlg);
  20. void UpdateVolumeSlider(HWND hWnd, DWORD dwLine);
  21. DWORD GetMaxVolume ();
  22. HRESULT GetVolume ();
  23. void SetVolume(DWORD dwVol);
  24. BOOL GetMute ();
  25. void SetMute(BOOL fMute);
  26. void FreeMixer ();
  27. void DeviceChange_Cleanup ();
  28. BOOL DeviceChange_GetHandle(DWORD dwMixerID, HANDLE *phDevice);
  29. void DeviceChange_Init(HWND hWnd, DWORD dwMixerID);
  30. void DeviceChange_Change(HWND hDlg, WPARAM wParam, LPARAM lParam);
  31. void MasterVolumeScroll(HWND hwnd, HWND hwndCtl, UINT code, int pos);
  32. void HandlePowerBroadcast (HWND hWnd, WPARAM wParam, LPARAM lParam);
  33. void SetBranding (HWND hwnd, UINT uiMixID);
  34. void ResetBranding (HWND hwnd);
  35. void FreeBrandBmp ();
  36. void CreateHotLink (BOOL fHotLink);
  37. BOOL ValidateURL ();
  38. HKEY OpenDeviceRegKey (UINT uiMixID, REGSAM sam);
  39. PTCHAR GetInterfaceName (DWORD dwMixerID);
  40. HKEY OpenDeviceBrandRegKey (UINT uiMixID);
  41. void RefreshMixCache ();
  42. // Globals
  43. UINT g_uiVolDevChange = 0;
  44. WNDPROC g_fnVolPSProc = NULL;
  45. HWND g_hWnd = NULL;
  46. HMIXER g_hMixer = NULL;
  47. enumSndVol g_sndvolPresent = sndvolNotChecked;
  48. BOOL g_fMasterVolume = FALSE; // True if the master volume slider is enabled
  49. BOOL g_fMasterMute = FALSE; // True if the master mute button is enabled
  50. BOOL g_fTrayIcon = FALSE; // Current state of tray icon button
  51. DWORD g_dwVolID = (DWORD) -1;
  52. DWORD g_dwMuteID = (DWORD) -1;
  53. LPVOID g_pvPrevious = NULL;
  54. double* g_pdblCacheMix = NULL;
  55. BOOL g_fCacheCreated = FALSE;
  56. BOOL g_fPreviousMute = FALSE;
  57. MIXERCONTROLDETAILS g_mcd;
  58. static HDEVNOTIFY g_hDeviceEventContext = NULL;
  59. BOOL g_fChanged = FALSE;
  60. BOOL g_fInternalGenerated = FALSE;
  61. UINT g_uiMixID = 0;
  62. DWORD g_dwDest = 0;
  63. HBITMAP g_hbmBrand = NULL;
  64. WCHAR* g_szHotLinkURL = NULL;
  65. WCHAR g_szDeviceName[MAX_PATH] = { L"\0" };
  66. WCHAR g_szNoAudioDevice[MAX_PATH] = { L"\0" };
  67. MIXERLINE g_mlDst;