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
4c63178c
Commit
4c63178c
authored
Mar 05, 2018
by
David Reid
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into jack
parents
eb620de0
a1e16050
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
21 deletions
+20
-21
mini_al.h
mini_al.h
+20
-21
No files found.
mini_al.h
View file @
4c63178c
...
@@ -584,7 +584,7 @@ typedef union
...
@@ -584,7 +584,7 @@ typedef union
char
alsa
[
256
];
// ALSA uses a name string for identification.
char
alsa
[
256
];
// ALSA uses a name string for identification.
#endif
#endif
#ifdef MAL_SUPPORT_PULSEAUDIO
#ifdef MAL_SUPPORT_PULSEAUDIO
char
pulse
audio
[
256
];
// PulseAudio uses a name string for identification.
char
pulse
[
256
];
// PulseAudio uses a name string for identification.
#endif
#endif
#ifdef MAL_SUPPORT_JACK
#ifdef MAL_SUPPORT_JACK
int
jack
;
// TODO: Set this to the correct data type.
int
jack
;
// TODO: Set this to the correct data type.
...
@@ -7627,7 +7627,7 @@ static void mal_pulse_device_info_list_callback(mal_pa_context* pPulseContext, c
...
@@ -7627,7 +7627,7 @@ static void mal_pulse_device_info_list_callback(mal_pa_context* pPulseContext, c
// The name from PulseAudio is the ID for mini_al.
// The name from PulseAudio is the ID for mini_al.
if
(
pName
!=
NULL
)
{
if
(
pName
!=
NULL
)
{
mal_strncpy_s
(
pData
->
pInfo
->
id
.
pulse
audio
,
sizeof
(
pData
->
pInfo
->
id
.
pulseaudio
),
pDescription
,
(
size_t
)
-
1
);
mal_strncpy_s
(
pData
->
pInfo
->
id
.
pulse
,
sizeof
(
pData
->
pInfo
->
id
.
pulse
),
pDescription
,
(
size_t
)
-
1
);
}
}
// The description from PulseAudio is the name for mini_al.
// The description from PulseAudio is the name for mini_al.
...
@@ -7965,7 +7965,7 @@ static mal_result mal_device_init__pulse(mal_context* pContext, mal_device_type
...
@@ -7965,7 +7965,7 @@ static mal_result mal_device_init__pulse(mal_context* pContext, mal_device_type
const
char
*
dev
=
NULL
;
const
char
*
dev
=
NULL
;
if
(
pDeviceID
!=
NULL
)
{
if
(
pDeviceID
!=
NULL
)
{
dev
=
pDeviceID
->
pulse
audio
;
dev
=
pDeviceID
->
pulse
;
}
}
if
(
type
==
mal_device_type_playback
)
{
if
(
type
==
mal_device_type_playback
)
{
...
@@ -8723,7 +8723,7 @@ static mal_result mal_device_init__oss(mal_context* pContext, mal_device_type ty
...
@@ -8723,7 +8723,7 @@ static mal_result mal_device_init__oss(mal_context* pContext, mal_device_type ty
return
mal_post_error
(
pDevice
,
"[OSS] Failed to set sample rate."
,
MAL_FORMAT_NOT_SUPPORTED
);
return
mal_post_error
(
pDevice
,
"[OSS] Failed to set sample rate."
,
MAL_FORMAT_NOT_SUPPORTED
);
}
}
pDevice
->
s
ampleRate
=
ossSampleRate
;
pDevice
->
internalS
ampleRate
=
ossSampleRate
;
...
@@ -9736,29 +9736,26 @@ mal_result mal_context_init__openal(mal_context* pContext)
...
@@ -9736,29 +9736,26 @@ mal_result mal_context_init__openal(mal_context* pContext)
mal_assert
(
pContext
!=
NULL
);
mal_assert
(
pContext
!=
NULL
);
#ifndef MAL_NO_RUNTIME_LINKING
#ifndef MAL_NO_RUNTIME_LINKING
const
char
*
libName
=
NULL
;
const
char
*
libNames
[]
=
{
#ifdef MAL_WIN32
#if defined(MAL_WIN32)
libName
=
"OpenAL32.dll"
;
"OpenAL32.dll"
,
"soft_oal.dll"
#endif
#endif
#if defined(MAL_UNIX) && !defined(MAL_APPLE)
#if defined(MAL_UNIX) && !defined(MAL_APPLE)
libName
=
"libopenal.so"
;
"libopenal.so"
,
"libopenal.so.1"
#endif
#endif
#if
def MAL_APPLE
#if
defined(MAL_APPLE)
libName
=
"OpenAL.framework/OpenAL"
;
"OpenAL.framework/OpenAL"
#endif
#endif
if
(
libName
==
NULL
)
{
};
return
MAL_NO_BACKEND
;
// Don't know what the library name is called.
}
pContext
->
openal
.
hOpenAL
=
mal_dlopen
(
libName
);
#ifdef MAL_WIN32
for
(
size_t
i
=
0
;
i
<
mal_countof
(
libNames
);
++
i
)
{
// Special case for Win32 - try "soft_oal.dll" for OpenAL-Soft drop-ins.
pContext
->
openal
.
hOpenAL
=
mal_dlopen
(
libNames
[
i
]);
if
(
pContext
->
openal
.
hOpenAL
==
NULL
)
{
if
(
pContext
->
openal
.
hOpenAL
!=
NULL
)
{
pContext
->
openal
.
hOpenAL
=
mal_dlopen
(
"soft_oal.dll"
);
break
;
}
}
}
#endif
if
(
pContext
->
openal
.
hOpenAL
==
NULL
)
{
if
(
pContext
->
openal
.
hOpenAL
==
NULL
)
{
return
MAL_FAILED_TO_INIT_BACKEND
;
return
MAL_FAILED_TO_INIT_BACKEND
;
...
@@ -14861,6 +14858,8 @@ void mal_pcm_f32_to_s32(int* pOut, const float* pIn, unsigned int count)
...
@@ -14861,6 +14858,8 @@ void mal_pcm_f32_to_s32(int* pOut, const float* pIn, unsigned int count)
//
//
// v0.x - 2018-xx-xx
// v0.x - 2018-xx-xx
// - Add support for PulseAudio.
// - Add support for PulseAudio.
// - Fix errors with OpenAL detection.
// - Fix some memory leaks.
// - Miscellaneous bug fixes.
// - Miscellaneous bug fixes.
//
//
// v0.7 - 2018-02-25
// v0.7 - 2018-02-25
...
...
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