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
8191bb50
You need to sign in or sign up before continuing.
Commit
8191bb50
authored
Dec 28, 2016
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix an error where the incorrect backend is being used.
parent
74a790a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
70 additions
and
50 deletions
+70
-50
mini_al.h
mini_al.h
+70
-50
No files found.
mini_al.h
View file @
8191bb50
...
...
@@ -4407,34 +4407,44 @@ mal_result mal_enumerate_devices(mal_context* pContext, mal_device_type type, ma
{
if
(
pCount
==
NULL
)
return
mal_post_error
(
NULL
,
"mal_enumerate_devices() called with invalid arguments."
,
MAL_INVALID_ARGS
);
mal_result
result
=
MAL_NO_BACKEND
;
#ifdef MAL_ENABLE_WASAPI
if
(
result
!=
MAL_SUCCESS
)
{
result
=
mal_enumerate_devices__wasapi
(
pContext
,
type
,
pCount
,
pInfo
);
}
#endif
#ifdef MAL_ENABLE_DSOUND
if
(
result
!=
MAL_SUCCESS
)
{
result
=
mal_enumerate_devices__dsound
(
pContext
,
type
,
pCount
,
pInfo
);
}
#endif
#ifdef MAL_ENABLE_ALSA
if
(
result
!=
MAL_SUCCESS
)
{
result
=
mal_enumerate_devices__alsa
(
pContext
,
type
,
pCount
,
pInfo
);
}
#endif
#ifdef MAL_ENABLE_OPENSLES
if
(
result
!=
MAL_SUCCESS
)
{
result
=
mal_enumerate_devices__sles
(
pContext
,
type
,
pCount
,
pInfo
);
}
#endif
#ifdef MAL_ENABLE_NULL
if
(
result
!=
MAL_SUCCESS
)
{
result
=
mal_enumerate_devices__null
(
pContext
,
type
,
pCount
,
pInfo
);
switch
(
pContext
->
backend
)
{
#ifdef MAL_ENABLE_WASAPI
case
mal_backend_wasapi
:
{
return
mal_enumerate_devices__wasapi
(
pContext
,
type
,
pCount
,
pInfo
);
}
break
;
#endif
#ifdef MAL_ENABLE_DSOUND
case
mal_backend_dsound
:
{
return
mal_enumerate_devices__dsound
(
pContext
,
type
,
pCount
,
pInfo
);
}
break
;
#endif
#ifdef MAL_ENABLE_ALSA
case
mal_backend_alsa
:
{
return
mal_enumerate_devices__alsa
(
pContext
,
type
,
pCount
,
pInfo
);
}
break
;
#endif
#ifdef MAL_ENABLE_OPENSLES
case
mal_backend_sles
:
{
return
mal_enumerate_devices__sles
(
pContext
,
type
,
pCount
,
pInfo
);
}
break
;
#endif
#ifdef MAL_ENABLE_NULL
case
mal_backend_null
:
{
return
mal_enumerate_devices__null
(
pContext
,
type
,
pCount
,
pInfo
);
}
break
;
#endif
default:
break
;
}
#endif
return
result
;
mal_assert
(
MAL_FALSE
);
return
MAL_NO_BACKEND
;
}
mal_result
mal_device_init
(
mal_context
*
pContext
,
mal_device_type
type
,
mal_device_id
*
pDeviceID
,
mal_device_config
*
pConfig
,
void
*
pUserData
,
mal_device
*
pDevice
)
...
...
@@ -4502,31 +4512,41 @@ mal_result mal_device_init(mal_context* pContext, mal_device_type type, mal_devi
mal_result
result
=
MAL_NO_BACKEND
;
#ifdef MAL_ENABLE_WASAPI
if
(
result
!=
MAL_SUCCESS
)
{
result
=
mal_device_init__wasapi
(
pContext
,
type
,
pDeviceID
,
pConfig
,
pDevice
);
}
#endif
#ifdef MAL_ENABLE_DSOUND
if
(
result
!=
MAL_SUCCESS
)
{
result
=
mal_device_init__dsound
(
pContext
,
type
,
pDeviceID
,
pConfig
,
pDevice
);
}
#endif
#ifdef MAL_ENABLE_ALSA
if
(
result
!=
MAL_SUCCESS
)
{
result
=
mal_device_init__alsa
(
pContext
,
type
,
pDeviceID
,
pConfig
,
pDevice
);
}
#endif
#ifdef MAL_ENABLE_OPENSLES
if
(
result
!=
MAL_SUCCESS
)
{
result
=
mal_device_init__sles
(
pContext
,
type
,
pDeviceID
,
pConfig
,
pDevice
);
}
#endif
#ifdef MAL_ENABLE_NULL
if
(
result
!=
MAL_SUCCESS
)
{
result
=
mal_device_init__null
(
pContext
,
type
,
pDeviceID
,
pConfig
,
pDevice
);
switch
(
pContext
->
backend
)
{
#ifdef MAL_ENABLE_WASAPI
case
mal_backend_wasapi
:
{
result
=
mal_device_init__wasapi
(
pContext
,
type
,
pDeviceID
,
pConfig
,
pDevice
);
}
break
;
#endif
#ifdef MAL_ENABLE_DSOUND
case
mal_backend_dsound
:
{
result
=
mal_device_init__dsound
(
pContext
,
type
,
pDeviceID
,
pConfig
,
pDevice
);
}
break
;
#endif
#ifdef MAL_ENABLE_ALSA
case
mal_backend_alsa
:
{
result
=
mal_device_init__alsa
(
pContext
,
type
,
pDeviceID
,
pConfig
,
pDevice
);
}
break
;
#endif
#ifdef MAL_ENABLE_OPENSLES
case
mal_backend_sles
:
{
result
=
mal_device_init__sles
(
pContext
,
type
,
pDeviceID
,
pConfig
,
pDevice
);
}
break
;
#endif
#ifdef MAL_ENABLE_NULL
case
mal_backend_null
:
{
result
=
mal_device_init__null
(
pContext
,
type
,
pDeviceID
,
pConfig
,
pDevice
);
}
break
;
#endif
default:
break
;
}
#endif
if
(
result
!=
MAL_SUCCESS
)
{
return
MAL_NO_BACKEND
;
// The error message will have been posted by the source of the error.
...
...
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