Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
miniaudio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
miniaudio
Commits
65cb6133
Commit
65cb6133
authored
Mar 18, 2018
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some errors with DirectSound.
parent
492dec69
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
mini_al.h
mini_al.h
+14
-6
No files found.
mini_al.h
View file @
65cb6133
...
@@ -3718,9 +3718,9 @@ void mal_channel_mask_to_channel_map__win32(DWORD dwChannelMask, mal_uint32 chan
...
@@ -3718,9 +3718,9 @@ void mal_channel_mask_to_channel_map__win32(DWORD dwChannelMask, mal_uint32 chan
}
}
#ifdef __cplusplus
#ifdef __cplusplus
#define mal_is_guid_equal(a, b) IsEqualGUID(
a, b
)
#define mal_is_guid_equal(a, b) IsEqualGUID(
*((const GUID*)a), *((const GUID*)b)
)
#else
#else
#define mal_is_guid_equal(a, b) IsEqualGUID(
&a, &
b)
#define mal_is_guid_equal(a, b) IsEqualGUID(
(const GUID*)a, (const GUID*)
b)
#endif
#endif
mal_format
mal_format_from_WAVEFORMATEX
(
WAVEFORMATEX
*
pWF
)
mal_format
mal_format_from_WAVEFORMATEX
(
WAVEFORMATEX
*
pWF
)
...
@@ -3729,7 +3729,7 @@ mal_format mal_format_from_WAVEFORMATEX(WAVEFORMATEX* pWF)
...
@@ -3729,7 +3729,7 @@ mal_format mal_format_from_WAVEFORMATEX(WAVEFORMATEX* pWF)
if
(
pWF
->
wFormatTag
==
WAVE_FORMAT_EXTENSIBLE
)
{
if
(
pWF
->
wFormatTag
==
WAVE_FORMAT_EXTENSIBLE
)
{
WAVEFORMATEXTENSIBLE
*
pWFEX
=
(
WAVEFORMATEXTENSIBLE
*
)
pWF
;
WAVEFORMATEXTENSIBLE
*
pWFEX
=
(
WAVEFORMATEXTENSIBLE
*
)
pWF
;
if
(
mal_is_guid_equal
(
pWFEX
->
SubFormat
,
MAL_GUID_KSDATAFORMAT_SUBTYPE_PCM
))
{
if
(
mal_is_guid_equal
(
&
pWFEX
->
SubFormat
,
&
MAL_GUID_KSDATAFORMAT_SUBTYPE_PCM
))
{
if
(
pWFEX
->
Samples
.
wValidBitsPerSample
==
32
)
{
if
(
pWFEX
->
Samples
.
wValidBitsPerSample
==
32
)
{
return
mal_format_s32
;
return
mal_format_s32
;
}
}
...
@@ -3748,7 +3748,7 @@ mal_format mal_format_from_WAVEFORMATEX(WAVEFORMATEX* pWF)
...
@@ -3748,7 +3748,7 @@ mal_format mal_format_from_WAVEFORMATEX(WAVEFORMATEX* pWF)
return
mal_format_u8
;
return
mal_format_u8
;
}
}
}
}
if
(
mal_is_guid_equal
(
pWFEX
->
SubFormat
,
MAL_GUID_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT
))
{
if
(
mal_is_guid_equal
(
&
pWFEX
->
SubFormat
,
&
MAL_GUID_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT
))
{
if
(
pWFEX
->
Samples
.
wValidBitsPerSample
==
32
)
{
if
(
pWFEX
->
Samples
.
wValidBitsPerSample
==
32
)
{
return
mal_format_f32
;
return
mal_format_f32
;
}
}
...
@@ -5405,12 +5405,20 @@ BOOL CALLBACK mal_context_get_device_info_callback__dsound(LPGUID lpGuid, LPCSTR
...
@@ -5405,12 +5405,20 @@ BOOL CALLBACK mal_context_get_device_info_callback__dsound(LPGUID lpGuid, LPCSTR
mal_context_get_device_info_callback_data__dsound
*
pData
=
(
mal_context_get_device_info_callback_data__dsound
*
)
lpContext
;
mal_context_get_device_info_callback_data__dsound
*
pData
=
(
mal_context_get_device_info_callback_data__dsound
*
)
lpContext
;
mal_assert
(
pData
!=
NULL
);
mal_assert
(
pData
!=
NULL
);
if
(
memcmp
(
pData
->
pDeviceID
->
dsound
,
lpGuid
,
sizeof
(
pData
->
pDeviceID
->
dsound
))
==
0
)
{
if
(
(
pData
->
pDeviceID
==
NULL
||
mal_is_guid_equal
(
pData
->
pDeviceID
->
dsound
,
&
MAL_GUID_NULL
))
&&
(
lpGuid
==
NULL
||
mal_is_guid_equal
(
lpGuid
,
&
MAL_GUID_NULL
))
)
{
mal_strncpy_s
(
pData
->
pDeviceInfo
->
name
,
sizeof
(
pData
->
pDeviceInfo
->
name
),
lpcstrDescription
,
(
size_t
)
-
1
);
mal_strncpy_s
(
pData
->
pDeviceInfo
->
name
,
sizeof
(
pData
->
pDeviceInfo
->
name
),
lpcstrDescription
,
(
size_t
)
-
1
);
pData
->
found
=
MAL_TRUE
;
pData
->
found
=
MAL_TRUE
;
return
FALSE
;
// Stop enumeration.
return
FALSE
;
// Stop enumeration.
}
else
{
if
(
memcmp
(
pData
->
pDeviceID
->
dsound
,
lpGuid
,
sizeof
(
pData
->
pDeviceID
->
dsound
))
==
0
)
{
mal_strncpy_s
(
pData
->
pDeviceInfo
->
name
,
sizeof
(
pData
->
pDeviceInfo
->
name
),
lpcstrDescription
,
(
size_t
)
-
1
);
pData
->
found
=
MAL_TRUE
;
return
FALSE
;
// Stop enumeration.
}
}
}
return
TRUE
;
return
TRUE
;
}
}
...
@@ -6230,7 +6238,7 @@ mal_result mal_context_get_device_info_from_WAVECAPS(mal_context* pContext, MAL_
...
@@ -6230,7 +6238,7 @@ mal_result mal_context_get_device_info_from_WAVECAPS(mal_context* pContext, MAL_
// but WinMM does not specificy the component name. From my admittedly limited testing, I've notice the component name seems to
// but WinMM does not specificy the component name. From my admittedly limited testing, I've notice the component name seems to
// usually fit within the 31 characters of the fixed sized buffer, so what I'm going to do is parse that string for the component
// usually fit within the 31 characters of the fixed sized buffer, so what I'm going to do is parse that string for the component
// name, and then concatenate the name from the registry.
// name, and then concatenate the name from the registry.
if
(
!
mal_is_guid_equal
(
pCaps
->
NameGuid
,
MAL_GUID_NULL
))
{
if
(
!
mal_is_guid_equal
(
&
pCaps
->
NameGuid
,
&
MAL_GUID_NULL
))
{
wchar_t
guidStrW
[
256
];
wchar_t
guidStrW
[
256
];
if
(((
MAL_PFN_StringFromGUID2
)
pContext
->
win32
.
StringFromGUID2
)(
&
pCaps
->
NameGuid
,
guidStrW
,
mal_countof
(
guidStrW
))
>
0
)
{
if
(((
MAL_PFN_StringFromGUID2
)
pContext
->
win32
.
StringFromGUID2
)(
&
pCaps
->
NameGuid
,
guidStrW
,
mal_countof
(
guidStrW
))
>
0
)
{
char
guidStr
[
256
];
char
guidStr
[
256
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment