Go to the source code of this file.
|
static VOID | ClearMixerCache (PSND_MIXER Mixer) |
|
PSND_MIXER | SndMixerCreate (HWND hWndNotification, UINT MixerId) |
|
VOID | SndMixerDestroy (PSND_MIXER Mixer) |
|
VOID | SndMixerClose (PSND_MIXER Mixer) |
|
BOOL | SndMixerQueryControls (PSND_MIXER Mixer, PUINT DisplayControls, LPMIXERLINE LineInfo, LPMIXERCONTROL *Controls) |
|
static BOOL | SndMixerQueryConnections (PSND_MIXER Mixer, PSND_MIXER_DESTINATION Line) |
|
static BOOL | SndMixerQueryDestinations (PSND_MIXER Mixer) |
|
BOOL | SndMixerSelect (PSND_MIXER Mixer, UINT MixerId) |
|
UINT | SndMixerGetSelection (PSND_MIXER Mixer) |
|
INT | SndMixerGetProductName (PSND_MIXER Mixer, LPTSTR lpBuffer, UINT uSize) |
|
INT | SndMixerGetLineName (PSND_MIXER Mixer, DWORD LineID, LPTSTR lpBuffer, UINT uSize, BOOL LongName) |
|
BOOL | SndMixerEnumProducts (PSND_MIXER Mixer, PFNSNDMIXENUMPRODUCTS EnumProc, PVOID Context) |
|
INT | SndMixerSetVolumeControlDetails (PSND_MIXER Mixer, DWORD dwControlID, DWORD cChannels, DWORD cbDetails, LPVOID paDetails) |
|
INT | SndMixerGetVolumeControlDetails (PSND_MIXER Mixer, DWORD dwControlID, DWORD cChannels, DWORD cbDetails, LPVOID paDetails) |
|
INT | SndMixerGetDestinationCount (PSND_MIXER Mixer) |
|
BOOL | SndMixerEnumLines (PSND_MIXER Mixer, PFNSNDMIXENUMLINES EnumProc, PVOID Context) |
|
BOOL | SndMixerEnumConnections (PSND_MIXER Mixer, DWORD LineID, PFNSNDMIXENUMCONNECTIONS EnumProc, PVOID Context) |
|
BOOL | SndMixerIsDisplayControl (PSND_MIXER Mixer, LPMIXERCONTROL Control) |
|
LPMIXERLINE | SndMixerGetLineByName (PSND_MIXER Mixer, DWORD LineID, LPWSTR LineName) |
|
◆ NO_MIXER_SELECTED
◆ ClearMixerCache()
Definition at line 31 of file mixer.c.
32{
35
37 {
39 {
41 0,
43 }
44
46 {
48 {
50 0,
52 }
53
56 0,
58 }
59
62 0,
64 }
66}
#define HeapFree(x, y, z)
PSND_MIXER_DESTINATION Lines
Referenced by SndMixerDestroy(), and SndMixerSelect().
◆ SndMixerClose()
◆ SndMixerCreate()
Definition at line 69 of file mixer.c.
70{
75 {
79
81 {
82
84 }
85 }
86
87 return Mixer;
88}
BOOL SndMixerSelect(PSND_MIXER Mixer, UINT MixerId)
struct _SND_MIXER SND_MIXER
struct _SND_MIXER * PSND_MIXER
UINT WINAPI mixerGetNumDevs(void)
Referenced by DlgPreferencesProc(), and MainWindowProc().
◆ SndMixerDestroy()
Definition at line 91 of file mixer.c.
92{
96 0,
97 Mixer);
98}
static VOID ClearMixerCache(PSND_MIXER Mixer)
VOID SndMixerClose(PSND_MIXER Mixer)
Referenced by MainWindowProc().
◆ SndMixerEnumConnections()
Definition at line 552 of file mixer.c.
556{
558 {
560
562 {
563 if (
Line->Info.dwLineID == LineID)
564 {
566
567 if (
Line->DisplayControls != 0)
568 {
570 LineID,
573 {
575 }
576 }
577
578 for (Connection =
Line->Connections; Connection !=
NULL; Connection = Connection->
Next)
579 {
581 LineID,
584 {
586 }
587 }
588
590 }
591 }
592 }
593
595}
static BOOL CALLBACK EnumProc(_In_ HWND hWnd, _In_ LPARAM lParam)
struct _SND_MIXER_CONNECTION * Next
Referenced by LoadDialogCtrls(), MainWindowProc(), and UpdatePrefDlgControls().
◆ SndMixerEnumLines()
◆ SndMixerEnumProducts()
Definition at line 431 of file mixer.c.
434{
439
441 {
444 0,
445 0,
447 {
449 &Caps,
451 {
456 {
459 break;
460 }
461 }
462 else
463 {
464 DPRINT(
"Failed to get device capabilities for mixer id %d!\n",
i);
465 }
467 }
468 }
469
470 return Ret;
471}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
CHAR szPname[MAXPNAMELEN]
UINT WINAPI mixerOpen(LPHMIXER lphMix, UINT uDeviceID, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen)
Referenced by DlgPreferencesProc().
◆ SndMixerGetDestinationCount()
◆ SndMixerGetLineByName()
Definition at line 615 of file mixer.c.
618{
621
624
626 {
627 if (
Line->Info.dwLineID == LineID)
628 {
629 if (
Line->DisplayControls != 0)
630 {
632 {
634 }
635 }
636
637 for (Connection =
Line->Connections; Connection !=
NULL; Connection = Connection->
Next)
638 {
640 {
641 return &Connection->
Info;
642 }
643 }
644
646 }
647 }
648
650}
CHAR szName[MIXER_LONG_NAME_CHARS]
Referenced by MainWindowProc().
◆ SndMixerGetLineName()
Definition at line 390 of file mixer.c.
395{
397 {
401
403 {
404 if (
Line->Info.dwLineID == LineID)
405 {
407 break;
408 }
409 }
410
412 {
414 if(lnsz + 1 > uSize)
415 {
416 return lnsz + 1;
417 }
418 else
419 {
422 return lnsz;
423 }
424 }
425 }
426
427 return -1;
428}
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
_In_ ULONGLONG _In_ PUNICODE_STRING _In_ PUNICODE_STRING LongName
#define memcpy(s1, s2, n)
CHAR szShortName[MIXER_SHORT_NAME_CHARS]
Referenced by EnumConnectionsCallback(), PrefDlgAddConnection(), and WriteLineSettings().
◆ SndMixerGetProductName()
◆ SndMixerGetSelection()
◆ SndMixerGetVolumeControlDetails()
◆ SndMixerIsDisplayControl()
Definition at line 598 of file mixer.c.
600{
602 {
604 {
608 }
609 }
610
612}
#define MIXERCONTROL_CONTROLF_DISABLED
#define MIXERCONTROL_CT_CLASS_MASK
#define MIXERCONTROL_CT_CLASS_FADER
#define MIXERCONTROL_CT_CLASS_SWITCH
_In_ WDF_WMI_PROVIDER_CONTROL Control
Referenced by SndMixerQueryControls().
◆ SndMixerQueryConnections()
Definition at line 175 of file mixer.c.
177{
178 UINT i, DispControls;
182
183 LineInfo.
cbStruct =
sizeof(LineInfo);
184 for (
i =
Line->Info.cConnections;
i > 0;
i--)
185 {
189 &LineInfo,
192 {
195
197
198 DispControls = 0;
199
201 &DispControls,
202 &LineInfo,
203 &Controls))
204 {
205 DPRINT(
"Failed to query connection controls\n");
207 break;
208 }
209
214 {
215 Con->Info = LineInfo;
216 Con->Controls = Controls;
217 Con->DisplayControls = DispControls;
220 }
221 else
222 {
224 0,
225 Controls);
226 }
227 }
228 else
229 {
230 DPRINT(
"Failed to get connection information: %d\n",
Result);
232 break;
233 }
234 }
235
236 return Ret;
237}
BOOL SndMixerQueryControls(PSND_MIXER Mixer, PUINT DisplayControls, LPMIXERLINE LineInfo, LPMIXERCONTROL *Controls)
#define MIXER_GETLINEINFOF_SOURCE
struct _SND_MIXER_CONNECTION SND_MIXER_CONNECTION
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Referenced by SndMixerQueryDestinations().
◆ SndMixerQueryControls()
Definition at line 112 of file mixer.c.
116{
118 {
122 if (*Controls !=
NULL)
123 {
127
128 LineControls.
cbStruct =
sizeof(LineControls);
133
135 &LineControls,
138 {
140 {
143 {
144 (*DisplayControls)++;
145 }
146
147 DPRINT(
"Line control: %ws (0x%x, 0x%x)\n", (*Controls)[
j].
szName, (*Controls)[
j].fdwControl, (*Controls)[
j].dwControlType);
148 }
149
151 }
152 else
153 {
155 0,
156 *Controls);
159 }
160 }
161 else
162 {
163 DPRINT(
"Failed to allocate memory for %d line (ID: 0x%x) controls!\n", LineInfo->
dwLineID, LineInfo->
cControls);
164 }
165
167 }
168 else
169 {
171 }
172}
BOOL SndMixerIsDisplayControl(PSND_MIXER Mixer, LPMIXERCONTROL Control)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
MIXERCONTROLA MIXERCONTROL
#define mixerGetLineControls
#define MIXER_GETLINECONTROLSF_ALL
static const WCHAR szName[]
Referenced by EnumConnectionsCallback(), MixerControlChangeCallback(), OnInitDialog(), SetVolumeCallback(), SndMixerQueryConnections(), and SndMixerQueryDestinations().
◆ SndMixerQueryDestinations()
Definition at line 240 of file mixer.c.
241{
244
246 {
248
253 {
254 Line->Info.cbStruct =
sizeof(
Line->Info);
255 Line->Info.dwDestination =
i - 1;
259 {
260 DPRINT(
"+ Destination: %ws (0x%x, %d)\n",
Line->Info.szName,
Line->Info.dwLineID,
Line->Info.dwComponentType);
261
263 &
Line->DisplayControls,
266 {
267 DPRINT(
"Failed to query mixer controls!\n");
269 break;
270 }
271
273 {
274 DPRINT(
"Failed to query mixer connections!\n");
276 break;
277 }
278
281 }
282 else
283 {
284 DPRINT(
"Failed to get line information for id %d!\n",
i);
286 0,
289 break;
290 }
291 }
292 else
293 {
294 DPRINT(
"Allocation of SND_MIXER_DEST structure for id %d failed!\n",
i);
296 break;
297 }
298 }
299
300 return Ret;
301}
static BOOL SndMixerQueryConnections(PSND_MIXER Mixer, PSND_MIXER_DESTINATION Line)
#define MIXER_GETLINEINFOF_DESTINATION
struct _SND_MIXER_DESTINATION SND_MIXER_DESTINATION
Referenced by SndMixerSelect().
◆ SndMixerSelect()
Definition at line 304 of file mixer.c.
306{
308 {
310 }
311
313
315 MixerId,
317 0,
320 MixerId,
322 0,
325 MixerId,
326 0,
327 0,
329 {
333 {
335
337
339
341
342 if (!Ret)
343 {
345 }
346
347 return Ret;
348 }
349 else
350 {
352 }
353 }
354
358}
static BOOL SndMixerQueryDestinations(PSND_MIXER Mixer)
#define MIXER_OBJECTF_MIXER
Referenced by SndMixerCreate(), and UpdatePrefDlgControls().
◆ SndMixerSetVolumeControlDetails()
Definition at line 474 of file mixer.c.
475{
477
479 {
486
488 {
489 return 1;
490 }
491 }
492
493 return -1;
494}
#define MIXER_SETCONTROLDETAILSF_VALUE
UINT WINAPI mixerSetControlDetails(HMIXEROBJ hmix, LPMIXERCONTROLDETAILS lpmcd, DWORD fdwDetails)
Referenced by OnHScroll(), and SetVolumeCallback().