name correction

This commit is contained in:
Joshua Reisenauer 2016-05-19 15:22:12 -07:00
parent 76ff4d220e
commit b10425492a

View File

@ -59,9 +59,9 @@
//----------------------------------------------------------------------------------
// Defines and Macros
//----------------------------------------------------------------------------------
#define MAX_STREAM_BUFFERS 2
#define MAX_AUDIO_CONTEXTS 4 // Number of open AL sources
#define MAX_MUSIC_STREAMS 2
#define MAX_STREAM_BUFFERS 2 // Number of buffers for each alSource
#define MAX_MIX_CHANNELS 4 // Number of open AL sources
#define MAX_MUSIC_STREAMS 2 // Number of simultanious music sources
#if defined(PLATFORM_RPI) || defined(PLATFORM_ANDROID)
// NOTE: On RPI and Android should be lower to avoid frame-stalls
@ -111,7 +111,7 @@ typedef enum { INFO = 0, ERROR, WARNING, DEBUG, OTHER } TraceLogType;
//----------------------------------------------------------------------------------
// Global Variables Definition
//----------------------------------------------------------------------------------
static MixChannel_t* mixChannelsActive_g[MAX_AUDIO_CONTEXTS]; // What mix channels are currently active
static MixChannel_t* mixChannelsActive_g[MAX_MIX_CHANNELS]; // What mix channels are currently active
static bool musicEnabled_g = false;
static Music currentMusic[MAX_MUSIC_STREAMS]; // Current music loaded, up to two can play at the same time
@ -212,7 +212,7 @@ bool IsAudioDeviceReady(void)
// exmple usage is InitMixChannel(48000, 0, 2, true); // mixchannel 1, 48khz, stereo, floating point
static MixChannel_t* InitMixChannel(unsigned short sampleRate, unsigned char mixChannel, unsigned char channels, bool floatingPoint)
{
if(mixChannel >= MAX_AUDIO_CONTEXTS) return NULL;
if(mixChannel >= MAX_MIX_CHANNELS) return NULL;
if(!IsAudioDeviceReady()) InitAudioDevice();
if(!mixChannelsActive_g[mixChannel]){
@ -380,10 +380,10 @@ static void ResampleByteToFloat(char *chars, float *floats, unsigned short len)
RawAudioContext InitRawAudioContext(int sampleRate, int channels, bool floatingPoint)
{
int mixIndex;
for(mixIndex = 0; mixIndex < MAX_AUDIO_CONTEXTS; mixIndex++) // find empty mix channel slot
for(mixIndex = 0; mixIndex < MAX_MIX_CHANNELS; mixIndex++) // find empty mix channel slot
{
if(mixChannelsActive_g[mixIndex] == NULL) break;
else if(mixIndex = MAX_AUDIO_CONTEXTS - 1) return -1; // error
else if(mixIndex = MAX_MIX_CHANNELS - 1) return -1; // error
}
if(InitMixChannel(sampleRate, mixIndex, channels, floatingPoint))
@ -755,10 +755,10 @@ int PlayMusicStream(int musicIndex, char *fileName)
if(currentMusic[musicIndex].stream || currentMusic[musicIndex].chipctx) return 1; // error
for(mixIndex = 0; mixIndex < MAX_AUDIO_CONTEXTS; mixIndex++) // find empty mix channel slot
for(mixIndex = 0; mixIndex < MAX_MIX_CHANNELS; mixIndex++) // find empty mix channel slot
{
if(mixChannelsActive_g[mixIndex] == NULL) break;
else if(mixIndex = MAX_AUDIO_CONTEXTS - 1) return 2; // error
else if(mixIndex = MAX_MIX_CHANNELS - 1) return 2; // error
}
if (strcmp(GetExtension(fileName),"ogg") == 0)