J :
* Fix the buggy charset
This commit is contained in:
+11
-11
@@ -33,12 +33,12 @@ JMP3* g_CurrentMP3;
|
|||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////
|
||||||
WAVDATA* p_currentWav[NUMBER_WAV_CHANNELS]; // 各通道当前的播放
|
WAVDATA* p_currentWav[NUMBER_WAV_CHANNELS]; // 各通道当前的播放
|
||||||
WAVDATA currentWav[NUMBER_WAV_CHANNELS]; // 各通道当前的播放
|
WAVDATA currentWav[NUMBER_WAV_CHANNELS]; // 各通道当前的播放
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////
|
||||||
char loadWaveData(WAVDATA* p_wav, char* fileName, char memLoad) // WAVE加载, memLoad-是否加载至内磥E
|
char loadWaveData(WAVDATA* p_wav, char* fileName, char memLoad) // WAVE加载, memLoad-是否加载至内磥E
|
||||||
{
|
{
|
||||||
|
|
||||||
JFileSystem* fileSystem = JFileSystem::GetInstance();
|
JFileSystem* fileSystem = JFileSystem::GetInstance();
|
||||||
@@ -162,7 +162,7 @@ char loadWaveData(WAVDATA* p_wav, char* fileName, char memLoad) // WAVE
|
|||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////
|
||||||
void releaseWaveData(WAVDATA* p_wav) // WAVE释放
|
void releaseWaveData(WAVDATA* p_wav) // WAVE释放
|
||||||
{
|
{
|
||||||
if (p_wav->fd==-1)
|
if (p_wav->fd==-1)
|
||||||
free(p_wav->buffer);
|
free(p_wav->buffer);
|
||||||
@@ -172,7 +172,7 @@ void releaseWaveData(WAVDATA* p_wav) // WAVE
|
|||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////
|
||||||
void audioOutCallback(int channel, void* buf, unsigned int length) // 各通道回祦E
|
void audioOutCallback(int channel, void* buf, unsigned int length) // 各通道回祦E
|
||||||
{
|
{
|
||||||
WAVDATA* p_wav = NULL;
|
WAVDATA* p_wav = NULL;
|
||||||
memset(buf, 0, 4096);
|
memset(buf, 0, 4096);
|
||||||
@@ -313,7 +313,7 @@ void audioOutCallback_2(void* buf, unsigned int length, void *userdata) {audioOu
|
|||||||
//void audioOutCallback_3(void* buf, unsigned int length, void *userdata) {audioOutCallback(3, buf, length);}
|
//void audioOutCallback_3(void* buf, unsigned int length, void *userdata) {audioOutCallback(3, buf, length);}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////
|
||||||
char playWaveFile(int channel, char* fullName, unsigned long flag) // 播放WAVE文件
|
char playWaveFile(int channel, char* fullName, unsigned long flag) // 播放WAVE文件
|
||||||
{
|
{
|
||||||
stopWaveMem(channel);
|
stopWaveMem(channel);
|
||||||
if (currentWav[channel].fullName[0])
|
if (currentWav[channel].fullName[0])
|
||||||
@@ -326,14 +326,14 @@ char playWaveFile(int channel, char* fullName, unsigned long flag) //
|
|||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////
|
||||||
void stopWaveFile(int channel) // 停止WAVE文件
|
void stopWaveFile(int channel) // 停止WAVE文件
|
||||||
{
|
{
|
||||||
if (currentWav[channel].fullName[0])
|
if (currentWav[channel].fullName[0])
|
||||||
releaseWaveData(¤tWav[channel]);
|
releaseWaveData(¤tWav[channel]);
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////
|
||||||
int playWaveMem(WAVDATA* p_wav, unsigned long flag) // 播放WAVE
|
int playWaveMem(WAVDATA* p_wav, unsigned long flag) // 播放WAVE
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i=0;i<NUMBER_WAV_CHANNELS;i++)
|
for (i=0;i<NUMBER_WAV_CHANNELS;i++)
|
||||||
@@ -356,13 +356,13 @@ int playWaveMem(WAVDATA* p_wav, unsigned long flag) //
|
|||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////
|
||||||
void stopWaveMem(int channel) // 停止WAVE
|
void stopWaveMem(int channel) // 停止WAVE
|
||||||
{
|
{
|
||||||
p_currentWav[channel] = NULL;
|
p_currentWav[channel] = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////
|
||||||
void setChannelFlag(int channel, int flag) // 设置播放属性
|
void setChannelFlag(int channel, int flag) // 设置播放属性
|
||||||
{
|
{
|
||||||
WAVDATA* p_wav = NULL;
|
WAVDATA* p_wav = NULL;
|
||||||
if (!currentWav[channel].fullName[0])
|
if (!currentWav[channel].fullName[0])
|
||||||
@@ -379,7 +379,7 @@ void setChannelFlag(int channel, int flag) //
|
|||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////
|
||||||
void audioInit() // 初始化
|
void audioInit() // 初始化
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i=0; i<NUMBER_WAV_CHANNELS; i++)
|
for (i=0; i<NUMBER_WAV_CHANNELS; i++)
|
||||||
|
|||||||
Reference in New Issue
Block a user