summaryrefslogtreecommitdiffhomepage
path: root/src/raudio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/raudio.c')
-rw-r--r--src/raudio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/raudio.c b/src/raudio.c
index 3c2379a2..6be1960c 100644
--- a/src/raudio.c
+++ b/src/raudio.c
@@ -785,7 +785,7 @@ Sound LoadSoundFromWave(Wave wave)
//
// First option has been selected, format conversion is done on the loading stage.
// The downside is that it uses more memory if the original sound is u8 or s16.
- ma_format formatIn = ((wave.sampleSize == 8)? ma_format_u8 : ((wave.sampleSize == 16)? ma_format_s16 : ma_format_f32));
+ ma_format formatIn = ((wave.sampleSize == 8)? ma_format_u8 : ((wave.sampleSize == 16)? ma_format_s16 : ma_format_f32));
ma_uint32 frameCountIn = wave.sampleCount/wave.channels;
ma_uint32 frameCount = (ma_uint32)ma_convert_frames(NULL, 0, AUDIO_DEVICE_FORMAT, AUDIO_DEVICE_CHANNELS, AUDIO.System.device.sampleRate, NULL, frameCountIn, formatIn, wave.channels, wave.sampleRate);
@@ -2108,7 +2108,7 @@ static void OnSendAudioDataToDevice(ma_device *pDevice, void *pFramesOut, const
if (framesJustRead > 0)
{
float *framesOut = (float *)pFramesOut + (framesRead*AUDIO.System.device.playback.channels);
- float *framesIn = tempBuffer;
+ float *framesIn = tempBuffer;
MixAudioFrames(framesOut, framesIn, framesJustRead, audioBuffer->volume);
@@ -2159,7 +2159,7 @@ static void MixAudioFrames(float *framesOut, const float *framesIn, ma_uint32 fr
for (ma_uint32 iChannel = 0; iChannel < AUDIO.System.device.playback.channels; ++iChannel)
{
float *frameOut = framesOut + (iFrame*AUDIO.System.device.playback.channels);
- const float *frameIn = framesIn + (iFrame*AUDIO.System.device.playback.channels);
+ const float *frameIn = framesIn + (iFrame*AUDIO.System.device.playback.channels);
frameOut[iChannel] += (frameIn[iChannel]*localVolume);
}