Review code formatting
This commit is contained in:
parent
7bc2e922c9
commit
b188008a1c
6 changed files with 28 additions and 24 deletions
14
src/raudio.c
14
src/raudio.c
|
@ -1311,7 +1311,7 @@ Music LoadMusicStream(const char *fileName)
|
|||
}
|
||||
|
||||
// extension including period ".mod"
|
||||
Music LoadMusicStreamFromMemory(const char *fileType, unsigned char* data, int dataSize)
|
||||
Music LoadMusicStreamFromMemory(const char *fileType, unsigned char *data, int dataSize)
|
||||
{
|
||||
Music music = { 0 };
|
||||
bool musicLoaded = false;
|
||||
|
@ -1325,7 +1325,7 @@ Music LoadMusicStreamFromMemory(const char *fileType, unsigned char* data, int d
|
|||
{
|
||||
drwav *ctxWav = RL_CALLOC(1, sizeof(drwav));
|
||||
|
||||
bool success = drwav_init_memory(ctxWav, (const void*)data, dataSize, NULL);
|
||||
bool success = drwav_init_memory(ctxWav, (const void *)data, dataSize, NULL);
|
||||
|
||||
music.ctxType = MUSIC_AUDIO_WAV;
|
||||
music.ctxData = ctxWav;
|
||||
|
@ -1383,7 +1383,7 @@ Music LoadMusicStreamFromMemory(const char *fileType, unsigned char* data, int d
|
|||
// Open ogg audio stream
|
||||
music.ctxType = MUSIC_AUDIO_OGG;
|
||||
//music.ctxData = stb_vorbis_open_filename(fileName, NULL, NULL);
|
||||
music.ctxData = stb_vorbis_open_memory((const unsigned char*)data, dataSize, NULL, NULL);
|
||||
music.ctxData = stb_vorbis_open_memory((const unsigned char *)data, dataSize, NULL, NULL);
|
||||
|
||||
if (music.ctxData != NULL)
|
||||
{
|
||||
|
@ -1403,7 +1403,7 @@ Music LoadMusicStreamFromMemory(const char *fileType, unsigned char* data, int d
|
|||
else if (TextIsEqual(fileExtLower, ".xm"))
|
||||
{
|
||||
jar_xm_context_t *ctxXm = NULL;
|
||||
int result = jar_xm_create_context_safe(&ctxXm, (const char*)data, dataSize, AUDIO.System.device.sampleRate);
|
||||
int result = jar_xm_create_context_safe(&ctxXm, (const char *)data, dataSize, AUDIO.System.device.sampleRate);
|
||||
if (result == 0) // XM AUDIO.System.context created successfully
|
||||
{
|
||||
music.ctxType = MUSIC_MODULE_XM;
|
||||
|
@ -1660,17 +1660,17 @@ void UpdateMusicStream(Music music)
|
|||
{
|
||||
case ma_format_f32:
|
||||
// NOTE: Internally this function considers 2 channels generation, so samplesCount/2
|
||||
jar_xm_generate_samples((jar_xm_context_t*)music.ctxData, (float*)pcm, samplesCount/2);
|
||||
jar_xm_generate_samples((jar_xm_context_t*)music.ctxData, (float *)pcm, samplesCount/2);
|
||||
break;
|
||||
|
||||
case ma_format_s16:
|
||||
// NOTE: Internally this function considers 2 channels generation, so samplesCount/2
|
||||
jar_xm_generate_samples_16bit((jar_xm_context_t*)music.ctxData, (short*)pcm, samplesCount/2);
|
||||
jar_xm_generate_samples_16bit((jar_xm_context_t*)music.ctxData, (short *)pcm, samplesCount/2);
|
||||
break;
|
||||
|
||||
case ma_format_u8:
|
||||
// NOTE: Internally this function considers 2 channels generation, so samplesCount/2
|
||||
jar_xm_generate_samples_8bit((jar_xm_context_t*)music.ctxData, (char*)pcm, samplesCount/2);
|
||||
jar_xm_generate_samples_8bit((jar_xm_context_t*)music.ctxData, (char *)pcm, samplesCount/2);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue