Clean trailing spaces
This commit is contained in:
parent
c91190fc6e
commit
1fea266472
9 changed files with 179 additions and 189 deletions
18
src/raudio.c
18
src/raudio.c
|
@ -829,15 +829,7 @@ Wave LoadWaveFromMemory(const char *fileType, const unsigned char *fileData, int
|
||||||
{
|
{
|
||||||
qoa_desc qoa = { 0 };
|
qoa_desc qoa = { 0 };
|
||||||
|
|
||||||
unsigned int result = qoa_decode_header(fileData, dataSize, &qoa);
|
// NOTE: Returned sample data is always 16 bit?
|
||||||
|
|
||||||
if (result > 0)
|
|
||||||
{
|
|
||||||
|
|
||||||
// Calculate the total audio frame count
|
|
||||||
wave.frameCount = qoa.samples;
|
|
||||||
|
|
||||||
// NOTE: Returned sample data is always 16 bit
|
|
||||||
wave.data = qoa_decode(fileData, dataSize, &qoa);
|
wave.data = qoa_decode(fileData, dataSize, &qoa);
|
||||||
wave.sampleSize = 16;
|
wave.sampleSize = 16;
|
||||||
|
|
||||||
|
@ -845,10 +837,10 @@ Wave LoadWaveFromMemory(const char *fileType, const unsigned char *fileData, int
|
||||||
{
|
{
|
||||||
wave.channels = qoa.channels;
|
wave.channels = qoa.channels;
|
||||||
wave.sampleRate = qoa.samplerate;
|
wave.sampleRate = qoa.samplerate;
|
||||||
|
wave.frameCount = qoa.samples;
|
||||||
}
|
}
|
||||||
else TRACELOG(LOG_WARNING, "WAVE: Failed to load QOA data");
|
else TRACELOG(LOG_WARNING, "WAVE: Failed to load QOA data");
|
||||||
}
|
|
||||||
else TRACELOG(LOG_WARNING, "WAVE: Failed to load QOA data");
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if defined(SUPPORT_FILEFORMAT_FLAC)
|
#if defined(SUPPORT_FILEFORMAT_FLAC)
|
||||||
|
@ -1388,7 +1380,6 @@ Music LoadMusicStream(const char *fileName)
|
||||||
qoa_desc *ctxQoa = RL_CALLOC(1, sizeof(qoa_desc));
|
qoa_desc *ctxQoa = RL_CALLOC(1, sizeof(qoa_desc));
|
||||||
|
|
||||||
// TODO: QOA stream support: Init context from file
|
// TODO: QOA stream support: Init context from file
|
||||||
int result = 0;
|
|
||||||
|
|
||||||
music.ctxType = MUSIC_AUDIO_QOA;
|
music.ctxType = MUSIC_AUDIO_QOA;
|
||||||
music.ctxData = ctxQoa;
|
music.ctxData = ctxQoa;
|
||||||
|
@ -1587,12 +1578,11 @@ Music LoadMusicStreamFromMemory(const char *fileType, const unsigned char *data,
|
||||||
qoa_desc *ctxQoa = RL_CALLOC(1, sizeof(qoa_desc));
|
qoa_desc *ctxQoa = RL_CALLOC(1, sizeof(qoa_desc));
|
||||||
|
|
||||||
// TODO: Init QOA context data
|
// TODO: Init QOA context data
|
||||||
int result = 0;
|
|
||||||
|
|
||||||
music.ctxType = MUSIC_AUDIO_QOA;
|
music.ctxType = MUSIC_AUDIO_QOA;
|
||||||
music.ctxData = ctxQoa;
|
music.ctxData = ctxQoa;
|
||||||
|
|
||||||
if (result > 0)
|
if (success)
|
||||||
{
|
{
|
||||||
music.stream = LoadAudioStream(ctxQoa->samplerate, 16, ctxQoa->channels);
|
music.stream = LoadAudioStream(ctxQoa->samplerate, 16, ctxQoa->channels);
|
||||||
|
|
||||||
|
|
|
@ -1373,10 +1373,10 @@ void DrawMesh(Mesh mesh, Material material, Matrix transform)
|
||||||
if (material.shader.locs[SHADER_LOC_COLOR_SPECULAR] != -1)
|
if (material.shader.locs[SHADER_LOC_COLOR_SPECULAR] != -1)
|
||||||
{
|
{
|
||||||
float values[4] = {
|
float values[4] = {
|
||||||
(float)material.maps[MATERIAL_MAP_SPECULAR].color.r/255.0f,
|
(float)material.maps[SHADER_LOC_COLOR_SPECULAR].color.r/255.0f,
|
||||||
(float)material.maps[MATERIAL_MAP_SPECULAR].color.g/255.0f,
|
(float)material.maps[SHADER_LOC_COLOR_SPECULAR].color.g/255.0f,
|
||||||
(float)material.maps[MATERIAL_MAP_SPECULAR].color.b/255.0f,
|
(float)material.maps[SHADER_LOC_COLOR_SPECULAR].color.b/255.0f,
|
||||||
(float)material.maps[MATERIAL_MAP_SPECULAR].color.a/255.0f
|
(float)material.maps[SHADER_LOC_COLOR_SPECULAR].color.a/255.0f
|
||||||
};
|
};
|
||||||
|
|
||||||
rlSetUniform(material.shader.locs[SHADER_LOC_COLOR_SPECULAR], values, SHADER_UNIFORM_VEC4, 1);
|
rlSetUniform(material.shader.locs[SHADER_LOC_COLOR_SPECULAR], values, SHADER_UNIFORM_VEC4, 1);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue