11 #include "resources.h"
13 typedef struct _MIXER_WINDOW
17 struct _SND_MIXER
*Mixer
;
19 } MIXER_WINDOW
, *PMIXER_WINDOW
;
21 LRESULT CALLBACK
MainWindowProc(HWND hwnd
, UINT uMsg
, WPARAM wParam
, LPARAM lParam
);
23 BOOL
RebuildMixerWindowControls(PMIXER_WINDOW MixerWindow
);
25 extern HINSTANCE hAppInstance
;
26 extern ATOM MainWindowClass
;
28 extern HANDLE hAppHeap
;
30 #define SZ_APP_CLASS TEXT("Volume Control")
32 ULONG
DbgPrint(PCH
, ...);
33 #define DPRINT DbgPrint("SNDVOL32: %s:%i: ", __FILE__, __LINE__); DbgPrint
40 typedef struct _SND_MIXER_CONNECTION
42 struct _SND_MIXER_CONNECTION
*Next
;
44 LPMIXERCONTROL Controls
;
46 } SND_MIXER_CONNECTION
, *PSND_MIXER_CONNECTION
;
49 typedef struct _SND_MIXER_DESTINATION
51 struct _SND_MIXER_DESTINATION
*Next
;
53 LPMIXERCONTROL Controls
;
55 PSND_MIXER_CONNECTION Connections
;
56 } SND_MIXER_DESTINATION
, *PSND_MIXER_DESTINATION
;
58 typedef struct _SND_MIXER
61 HWND hWndNotification
;
65 PSND_MIXER_DESTINATION Lines
;
66 } SND_MIXER
, *PSND_MIXER
;
68 typedef BOOL (CALLBACK
*PFNSNDMIXENUMLINES
)(PSND_MIXER Mixer
, LPMIXERLINE Line
, UINT DisplayControls
, PVOID Context
);
69 typedef BOOL (CALLBACK
*PFNSNDMIXENUMCONNECTIONS
)(PSND_MIXER Mixer
, DWORD LineID
, LPMIXERLINE Line
, PVOID Context
);
70 typedef BOOL (CALLBACK
*PFNSNDMIXENUMPRODUCTS
)(PSND_MIXER Mixer
, UINT Id
, LPCTSTR ProductName
, PVOID Context
);
72 PSND_MIXER
SndMixerCreate(HWND hWndNotification
);
73 VOID
SndMixerDestroy(PSND_MIXER Mixer
);
74 VOID
SndMixerClose(PSND_MIXER Mixer
);
75 BOOL
SndMixerSelect(PSND_MIXER Mixer
, UINT MixerId
);
76 UINT
SndMixerGetSelection(PSND_MIXER Mixer
);
77 INT
SndMixerGetProductName(PSND_MIXER Mixer
, LPTSTR lpBuffer
, UINT uSize
);
78 INT
SndMixerGetLineName(PSND_MIXER Mixer
, DWORD LineID
, LPTSTR lpBuffer
, UINT uSize
, BOOL LongName
);
79 BOOL
SndMixerEnumProducts(PSND_MIXER Mixer
, PFNSNDMIXENUMPRODUCTS EnumProc
, PVOID Context
);
80 INT
SndMixerGetDestinationCount(PSND_MIXER Mixer
);
81 BOOL
SndMixerEnumLines(PSND_MIXER Mixer
, PFNSNDMIXENUMLINES EnumProc
, PVOID Context
);
82 BOOL
SndMixerEnumConnections(PSND_MIXER Mixer
, DWORD LineID
, PFNSNDMIXENUMCONNECTIONS EnumProc
, PVOID Context
);
83 BOOL
SndMixerIsDisplayControl(PSND_MIXER Mixer
, LPMIXERCONTROL Control
);
89 extern HKEY hAppSettingsKey
;
98 AllocAndLoadString(OUT LPWSTR
*lpTarget
,
103 LoadAndFormatString(IN HINSTANCE hInstance
,
105 OUT LPWSTR
*lpTarget
,
109 ReadLineConfig(IN LPTSTR szDeviceName
,
110 IN LPTSTR szLineName
,
111 IN LPTSTR szControlName
,
114 #endif /* __SNDVOL32_H */