Code tweak while using OpenAL backend
This commit is contained in:
parent
f2a675ae53
commit
230e78a23e
@ -1114,6 +1114,7 @@ void SetSoundPitch(Sound sound, float pitch)
|
|||||||
// Convert wave data to desired format
|
// Convert wave data to desired format
|
||||||
void WaveFormat(Wave *wave, int sampleRate, int sampleSize, int channels)
|
void WaveFormat(Wave *wave, int sampleRate, int sampleSize, int channels)
|
||||||
{
|
{
|
||||||
|
#if USE_MINI_AL
|
||||||
mal_format formatIn = ((wave->sampleSize == 8) ? mal_format_u8 : ((wave->sampleSize == 16) ? mal_format_s16 : mal_format_f32));
|
mal_format formatIn = ((wave->sampleSize == 8) ? mal_format_u8 : ((wave->sampleSize == 16) ? mal_format_s16 : mal_format_f32));
|
||||||
mal_format formatOut = (( sampleSize == 8) ? mal_format_u8 : (( sampleSize == 16) ? mal_format_s16 : mal_format_f32));
|
mal_format formatOut = (( sampleSize == 8) ? mal_format_u8 : (( sampleSize == 16) ? mal_format_s16 : mal_format_f32));
|
||||||
|
|
||||||
@ -1142,7 +1143,7 @@ void WaveFormat(Wave *wave, int sampleRate, int sampleSize, int channels)
|
|||||||
free(wave->data);
|
free(wave->data);
|
||||||
wave->data = data;
|
wave->data = data;
|
||||||
|
|
||||||
#if 0
|
#else
|
||||||
// Format sample rate
|
// Format sample rate
|
||||||
// NOTE: Only supported 22050 <--> 44100
|
// NOTE: Only supported 22050 <--> 44100
|
||||||
if (wave->sampleRate != sampleRate)
|
if (wave->sampleRate != sampleRate)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user