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
ce054406
Commit
ce054406
authored
Nov 18, 2017
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compilation errors and warnings with the Android build.
parent
3bf83007
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
mini_al.h
mini_al.h
+3
-3
resources/format_conversions.txt
resources/format_conversions.txt
+2
-2
No files found.
mini_al.h
View file @
ce054406
...
@@ -6802,7 +6802,7 @@ static SLuint32 mal_channel_id_to_opensl(mal_uint8 id)
...
@@ -6802,7 +6802,7 @@ static SLuint32 mal_channel_id_to_opensl(mal_uint8 id)
}
}
// Converts a channel mapping to an OpenSL-style channel mask.
// Converts a channel mapping to an OpenSL-style channel mask.
static
SLuint32
mal_channel_map_to_channel_mask__opensl
(
mal_uint8
channelMap
[
MAL_MAX_CHANNELS
],
mal_uint32
channels
)
static
SLuint32
mal_channel_map_to_channel_mask__opensl
(
const
mal_uint8
channelMap
[
MAL_MAX_CHANNELS
],
mal_uint32
channels
)
{
{
SLuint32
channelMask
=
0
;
SLuint32
channelMask
=
0
;
for
(
mal_uint32
iChannel
=
0
;
iChannel
<
channels
;
++
iChannel
)
{
for
(
mal_uint32
iChannel
=
0
;
iChannel
<
channels
;
++
iChannel
)
{
...
@@ -10528,7 +10528,7 @@ void mal_pcm_s32_to_f32(float* pOut, const int* pIn, unsigned int count)
...
@@ -10528,7 +10528,7 @@ void mal_pcm_s32_to_f32(float* pOut, const int* pIn, unsigned int count)
for
(
unsigned
int
i
=
0
;
i
<
count
;
++
i
)
{
for
(
unsigned
int
i
=
0
;
i
<
count
;
++
i
)
{
int
x
=
pIn
[
i
];
int
x
=
pIn
[
i
];
double
t
;
double
t
;
t
=
(
double
)(
x
+
2147483648
);
t
=
(
double
)(
x
+
2147483648
LL
);
t
=
t
*
0.0000000004656612873077392578125
;
t
=
t
*
0.0000000004656612873077392578125
;
r
=
(
float
)(
t
-
1
);
r
=
(
float
)(
t
-
1
);
pOut
[
i
]
=
(
float
)
r
;
pOut
[
i
]
=
(
float
)
r
;
...
@@ -10586,7 +10586,7 @@ void mal_pcm_f32_to_s32(int* pOut, const float* pIn, unsigned int count)
...
@@ -10586,7 +10586,7 @@ void mal_pcm_f32_to_s32(int* pOut, const float* pIn, unsigned int count)
c
=
((
x
<
-
1
)
?
-
1
:
((
x
>
1
)
?
1
:
x
));
c
=
((
x
<
-
1
)
?
-
1
:
((
x
>
1
)
?
1
:
x
));
c
=
c
+
1
;
c
=
c
+
1
;
t
=
(
mal_int64
)(
c
*
2147483647.5
);
t
=
(
mal_int64
)(
c
*
2147483647.5
);
r
=
(
int
)(
t
-
2147483648
);
r
=
(
int
)(
t
-
2147483648
LL
);
pOut
[
i
]
=
(
int
)
r
;
pOut
[
i
]
=
(
int
)
r
;
}
}
}
}
...
...
resources/format_conversions.txt
View file @
ce054406
...
@@ -119,7 +119,7 @@ s32->s24 {
...
@@ -119,7 +119,7 @@ s32->s24 {
# r = ((x + 2147483648) * 0.0000000004656612873077392578125) - 1
# r = ((x + 2147483648) * 0.0000000004656612873077392578125) - 1
s32->f32 {
s32->f32 {
dbl t;
dbl t;
add (dbl)t x 2147483648;
add (dbl)t x 2147483648
LL
;
mul t t 0.0000000004656612873077392578125;
mul t t 0.0000000004656612873077392578125;
sub (flt)r t 1;
sub (flt)r t 1;
}
}
...
@@ -159,5 +159,5 @@ f32->s32 {
...
@@ -159,5 +159,5 @@ f32->s32 {
clip c x;
clip c x;
add c c 1;
add c c 1;
mul (lng)t c 2147483647.5;
mul (lng)t c 2147483647.5;
sub (int)r t 2147483648;
sub (int)r t 2147483648
LL
;
}
}
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