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
132af6ff
Commit
132af6ff
authored
Nov 18, 2017
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add APIs for getting friendly names of backends and formats.
parent
a0776ec3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
+39
-0
mini_al.h
mini_al.h
+39
-0
No files found.
mini_al.h
View file @
132af6ff
...
@@ -1435,6 +1435,12 @@ void mal_mutex_unlock(mal_mutex* pMutex);
...
@@ -1435,6 +1435,12 @@ void mal_mutex_unlock(mal_mutex* pMutex);
//
//
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Retrieves a friendly name for a backend.
const
char
*
mal_get_backend_name
(
mal_backend
backend
);
// Retrieves a friendly name for a format.
const
char
*
mal_get_format_name
(
mal_format
format
);
// Blends two frames in floating point format.
// Blends two frames in floating point format.
void
mal_blend_f32
(
float
*
pOut
,
float
*
pInA
,
float
*
pInB
,
float
factor
,
mal_uint32
channels
);
void
mal_blend_f32
(
float
*
pOut
,
float
*
pInA
,
float
*
pInB
,
float
factor
,
mal_uint32
channels
);
...
@@ -10287,6 +10293,39 @@ mal_uint32 mal_convert_frames(void* pOut, mal_format formatOut, mal_uint32 chann
...
@@ -10287,6 +10293,39 @@ mal_uint32 mal_convert_frames(void* pOut, mal_format formatOut, mal_uint32 chann
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const
char
*
mal_get_backend_name
(
mal_backend
backend
)
{
switch
(
backend
)
{
case
mal_backend_null
:
return
"Null"
;
case
mal_backend_wasapi
:
return
"WASAPI"
;
case
mal_backend_dsound
:
return
"DirectSound"
;
case
mal_backend_winmm
:
return
"WinMM"
;
case
mal_backend_alsa
:
return
"ALSA"
;
//case mal_backend_pulse: return "PulseAudio";
//case mal_backend_jack: return "JACK";
//case mal_backend_coreaudio: return "Core Audio";
case
mal_backend_oss
:
return
"OSS"
;
case
mal_backend_opensl
:
return
"OpenSL|ES"
;
case
mal_backend_openal
:
return
"OpenAL"
;
default:
return
"Unknown"
;
}
}
const
char
*
mal_get_format_name
(
mal_format
format
)
{
switch
(
format
)
{
case
mal_format_unknown
:
return
"Unknown"
;
case
mal_format_u8
:
return
"8-bit Unsigned Integer"
;
case
mal_format_s16
:
return
"16-bit Signed Integer"
;
case
mal_format_s24
:
return
"24-bit Signed Integer (Tightly Packed)"
;
case
mal_format_s32
:
return
"32-bit Signed Integer"
;
case
mal_format_f32
:
return
"32-bit IEEE Floating Point"
;
default:
return
"Invalid"
;
}
}
void
mal_blend_f32
(
float
*
pOut
,
float
*
pInA
,
float
*
pInB
,
float
factor
,
mal_uint32
channels
)
void
mal_blend_f32
(
float
*
pOut
,
float
*
pInA
,
float
*
pInB
,
float
factor
,
mal_uint32
channels
)
{
{
for
(
mal_uint32
i
=
0
;
i
<
channels
;
++
i
)
{
for
(
mal_uint32
i
=
0
;
i
<
channels
;
++
i
)
{
...
...
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