summaryrefslogtreecommitdiffhomepage
path: root/src/raudio.c
diff options
context:
space:
mode:
authorRay <[email protected]>2019-03-20 10:57:41 +0100
committerRay <[email protected]>2019-03-20 10:57:41 +0100
commitc001bdb2de49522441b97380d7ee2721f95d438a (patch)
tree743dee76f7f9467b9ee45693d34c6612bb51540e /src/raudio.c
parentaa00d77110397ec6bda28815fd5a19a19e53988b (diff)
downloadraylib-c001bdb2de49522441b97380d7ee2721f95d438a.tar.gz
raylib-c001bdb2de49522441b97380d7ee2721f95d438a.zip
Checking issue with sound volume
It seems individual sound volume level is not set...
Diffstat (limited to 'src/raudio.c')
-rw-r--r--src/raudio.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/raudio.c b/src/raudio.c
index 2d59302e..1c153009 100644
--- a/src/raudio.c
+++ b/src/raudio.c
@@ -457,7 +457,7 @@ static void MixAudioFrames(float *framesOut, const float *framesIn, ma_uint32 fr
float *frameOut = framesOut + (iFrame*device.playback.channels);
const float *frameIn = framesIn + (iFrame*device.playback.channels);
- frameOut[iChannel] += frameIn[iChannel]*masterVolume*localVolume;
+ frameOut[iChannel] += (frameIn[iChannel]*masterVolume*localVolume);
}
}
}
@@ -595,11 +595,11 @@ AudioBuffer *CreateAudioBuffer(ma_format format, ma_uint32 channels, ma_uint32 s
return NULL;
}
- audioBuffer->volume = 1;
- audioBuffer->pitch = 1;
- audioBuffer->playing = 0;
- audioBuffer->paused = 0;
- audioBuffer->looping = 0;
+ audioBuffer->volume = 1.0f;
+ audioBuffer->pitch = 1.0f;
+ audioBuffer->playing = false;
+ audioBuffer->paused = false;
+ audioBuffer->looping = false;
audioBuffer->usage = usage;
audioBuffer->bufferSizeInFrames = bufferSizeInFrames;
audioBuffer->frameCursorPos = 0;
@@ -702,7 +702,7 @@ void SetAudioBufferVolume(AudioBuffer *audioBuffer, float volume)
{
if (audioBuffer == NULL)
{
- TraceLog(LOG_ERROR, "SetAudioBufferVolume() : No audio buffer");
+ TraceLog(LOG_WARNING, "SetAudioBufferVolume() : No audio buffer");
return;
}
@@ -714,7 +714,7 @@ void SetAudioBufferPitch(AudioBuffer *audioBuffer, float pitch)
{
if (audioBuffer == NULL)
{
- TraceLog(LOG_ERROR, "SetAudioBufferPitch() : No audio buffer");
+ TraceLog(LOG_WARNING, "SetAudioBufferPitch() : No audio buffer");
return;
}