mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 16:24:04 +02:00
Fix compilation errors and warnings with the Android build.
This commit is contained in:
@@ -6802,7 +6802,7 @@ static SLuint32 mal_channel_id_to_opensl(mal_uint8 id)
|
||||
}
|
||||
|
||||
// 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;
|
||||
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)
|
||||
for (unsigned int i = 0; i < count; ++i) {
|
||||
int x = pIn[i];
|
||||
double t;
|
||||
t = (double)(x + 2147483648);
|
||||
t = (double)(x + 2147483648LL);
|
||||
t = t * 0.0000000004656612873077392578125;
|
||||
r = (float)(t - 1);
|
||||
pOut[i] = (float)r;
|
||||
@@ -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 = c + 1;
|
||||
t = (mal_int64)(c * 2147483647.5);
|
||||
r = (int)(t - 2147483648);
|
||||
r = (int)(t - 2147483648LL);
|
||||
pOut[i] = (int)r;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ s32->s24 {
|
||||
# r = ((x + 2147483648) * 0.0000000004656612873077392578125) - 1
|
||||
s32->f32 {
|
||||
dbl t;
|
||||
add (dbl)t x 2147483648;
|
||||
add (dbl)t x 2147483648LL;
|
||||
mul t t 0.0000000004656612873077392578125;
|
||||
sub (flt)r t 1;
|
||||
}
|
||||
@@ -159,5 +159,5 @@ f32->s32 {
|
||||
clip c x;
|
||||
add c c 1;
|
||||
mul (lng)t c 2147483647.5;
|
||||
sub (int)r t 2147483648;
|
||||
sub (int)r t 2147483648LL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user