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
eb0e94fc
Commit
eb0e94fc
authored
Nov 10, 2017
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up and fix an incorrect error message.
parent
63485887
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
33 deletions
+8
-33
mini_al.h
mini_al.h
+8
-33
No files found.
mini_al.h
View file @
eb0e94fc
...
@@ -6008,7 +6008,7 @@ static mal_result mal_device_init__alsa(mal_context* pContext, mal_device_type t
...
@@ -6008,7 +6008,7 @@ static mal_result mal_device_init__alsa(mal_context* pContext, mal_device_type t
pDevice
->
alsa
.
pIntermediaryBuffer
=
mal_malloc
(
pDevice
->
bufferSizeInFrames
*
pDevice
->
channels
*
mal_get_sample_size_in_bytes
(
pDevice
->
format
));
pDevice
->
alsa
.
pIntermediaryBuffer
=
mal_malloc
(
pDevice
->
bufferSizeInFrames
*
pDevice
->
channels
*
mal_get_sample_size_in_bytes
(
pDevice
->
format
));
if
(
pDevice
->
alsa
.
pIntermediaryBuffer
==
NULL
)
{
if
(
pDevice
->
alsa
.
pIntermediaryBuffer
==
NULL
)
{
mal_device_uninit__alsa
(
pDevice
);
mal_device_uninit__alsa
(
pDevice
);
return
mal_post_error
(
pDevice
,
"[ALSA] Failed to
set software parameters. snd_pcm_sw_params() failed
."
,
MAL_OUT_OF_MEMORY
);
return
mal_post_error
(
pDevice
,
"[ALSA] Failed to
allocate memory for intermediary buffer
."
,
MAL_OUT_OF_MEMORY
);
}
}
}
}
...
@@ -8288,90 +8288,65 @@ mal_result mal_context_init(mal_backend backends[], mal_uint32 backendCount, con
...
@@ -8288,90 +8288,65 @@ mal_result mal_context_init(mal_backend backends[], mal_uint32 backendCount, con
for
(
mal_uint32
iBackend
=
0
;
iBackend
<
backendCount
;
++
iBackend
)
{
for
(
mal_uint32
iBackend
=
0
;
iBackend
<
backendCount
;
++
iBackend
)
{
mal_backend
backend
=
backends
[
iBackend
];
mal_backend
backend
=
backends
[
iBackend
];
result
=
MAL_NO_BACKEND
;
switch
(
backend
)
{
switch
(
backend
)
{
#ifdef MAL_ENABLE_WASAPI
#ifdef MAL_ENABLE_WASAPI
case
mal_backend_wasapi
:
case
mal_backend_wasapi
:
{
{
result
=
mal_context_init__wasapi
(
pContext
);
result
=
mal_context_init__wasapi
(
pContext
);
if
(
result
==
MAL_SUCCESS
)
{
pContext
->
backend
=
mal_backend_wasapi
;
return
result
;
}
}
break
;
}
break
;
#endif
#endif
#ifdef MAL_ENABLE_DSOUND
#ifdef MAL_ENABLE_DSOUND
case
mal_backend_dsound
:
case
mal_backend_dsound
:
{
{
result
=
mal_context_init__dsound
(
pContext
);
result
=
mal_context_init__dsound
(
pContext
);
if
(
result
==
MAL_SUCCESS
)
{
pContext
->
backend
=
mal_backend_dsound
;
return
result
;
}
}
break
;
}
break
;
#endif
#endif
#ifdef MAL_ENABLE_WINMM
#ifdef MAL_ENABLE_WINMM
case
mal_backend_winmm
:
case
mal_backend_winmm
:
{
{
result
=
mal_context_init__winmm
(
pContext
);
result
=
mal_context_init__winmm
(
pContext
);
if
(
result
==
MAL_SUCCESS
)
{
pContext
->
backend
=
mal_backend_winmm
;
return
result
;
}
}
break
;
}
break
;
#endif
#endif
#ifdef MAL_ENABLE_ALSA
#ifdef MAL_ENABLE_ALSA
case
mal_backend_alsa
:
case
mal_backend_alsa
:
{
{
result
=
mal_context_init__alsa
(
pContext
);
result
=
mal_context_init__alsa
(
pContext
);
if
(
result
==
MAL_SUCCESS
)
{
pContext
->
backend
=
mal_backend_alsa
;
return
result
;
}
}
break
;
}
break
;
#endif
#endif
#ifdef MAL_ENABLE_OSS
#ifdef MAL_ENABLE_OSS
case
mal_backend_oss
:
case
mal_backend_oss
:
{
{
result
=
mal_context_init__oss
(
pContext
);
result
=
mal_context_init__oss
(
pContext
);
if
(
result
==
MAL_SUCCESS
)
{
pContext
->
backend
=
mal_backend_oss
;
return
result
;
}
}
break
;
}
break
;
#endif
#endif
#ifdef MAL_ENABLE_OPENSL
#ifdef MAL_ENABLE_OPENSL
case
mal_backend_opensl
:
case
mal_backend_opensl
:
{
{
result
=
mal_context_init__opensl
(
pContext
);
result
=
mal_context_init__opensl
(
pContext
);
if
(
result
==
MAL_SUCCESS
)
{
pContext
->
backend
=
mal_backend_opensl
;
return
result
;
}
}
break
;
}
break
;
#endif
#endif
#ifdef MAL_ENABLE_OPENAL
#ifdef MAL_ENABLE_OPENAL
case
mal_backend_openal
:
case
mal_backend_openal
:
{
{
result
=
mal_context_init__openal
(
pContext
);
result
=
mal_context_init__openal
(
pContext
);
if
(
result
==
MAL_SUCCESS
)
{
pContext
->
backend
=
mal_backend_openal
;
return
result
;
}
}
break
;
}
break
;
#endif
#endif
#ifdef MAL_ENABLE_NULL
#ifdef MAL_ENABLE_NULL
case
mal_backend_null
:
case
mal_backend_null
:
{
{
result
=
mal_context_init__null
(
pContext
);
result
=
mal_context_init__null
(
pContext
);
if
(
result
==
MAL_SUCCESS
)
{
pContext
->
backend
=
mal_backend_null
;
return
result
;
}
}
break
;
}
break
;
#endif
#endif
default:
break
;
default:
break
;
}
}
// If this iteration was successful, return.
if
(
result
==
MAL_SUCCESS
)
{
pContext
->
backend
=
backend
;
return
result
;
}
}
}
mal_zero_object
(
pContext
);
// Safety.
mal_zero_object
(
pContext
);
// Safety.
...
...
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