[PATCH] Don't use magic numbers for float and short sizes
Thanks Alug
This commit is contained in:
parent
7f493e69d1
commit
5f99c77bcd
1 changed files with 2 additions and 2 deletions
|
|
@ -398,11 +398,11 @@ static boolean I_QueueNextSample(boolean unqueue)
|
|||
|
||||
if (sample_format == Float)
|
||||
{
|
||||
count = sf_read_float(audio.musicstream, (float *)stream, BUFFERSIZE) * 4; // float is 4 bytes not 2, so just double this shit for now kek
|
||||
count = sf_read_float(audio.musicstream, (float *)stream, BUFFERSIZE) * sizeof(float); // float is 4 bytes not 2, so just double this shit for now kek
|
||||
}
|
||||
else
|
||||
{
|
||||
count = sf_read_short(audio.musicstream, stream, BUFFERSIZE) * 2;
|
||||
count = sf_read_short(audio.musicstream, (short *)stream, BUFFERSIZE) * sizeof(short);
|
||||
}
|
||||
|
||||
if (count == 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue