mirror of
https://github.com/raysan5/raylib.git
synced 2025-10-08 02:46:28 +00:00
Some minor tweaks
This commit is contained in:
@@ -1518,10 +1518,8 @@ Music LoadMusicStreamFromMemory(const char *fileType, const unsigned char *data,
|
|||||||
jar_xm_set_max_loop_count(ctxXm, 0); // Set infinite number of loops
|
jar_xm_set_max_loop_count(ctxXm, 0); // Set infinite number of loops
|
||||||
|
|
||||||
unsigned int bits = 32;
|
unsigned int bits = 32;
|
||||||
if (AUDIO_DEVICE_FORMAT == ma_format_s16)
|
if (AUDIO_DEVICE_FORMAT == ma_format_s16) bits = 16;
|
||||||
bits = 16;
|
else if (AUDIO_DEVICE_FORMAT == ma_format_u8) bits = 8;
|
||||||
else if (AUDIO_DEVICE_FORMAT == ma_format_u8)
|
|
||||||
bits = 8;
|
|
||||||
|
|
||||||
// NOTE: Only stereo is supported for XM
|
// NOTE: Only stereo is supported for XM
|
||||||
music.stream = LoadAudioStream(AUDIO.System.device.sampleRate, bits, 2);
|
music.stream = LoadAudioStream(AUDIO.System.device.sampleRate, bits, 2);
|
||||||
@@ -1548,7 +1546,7 @@ Music LoadMusicStreamFromMemory(const char *fileType, const unsigned char *data,
|
|||||||
for (int i = 0; i < it; i++) newData[i] = data[i];
|
for (int i = 0; i < it; i++) newData[i] = data[i];
|
||||||
|
|
||||||
// Memory loaded version for jar_mod_load_file()
|
// Memory loaded version for jar_mod_load_file()
|
||||||
if (dataSize && dataSize < 32*1024*1024)
|
if (dataSize && (dataSize < 32*1024*1024))
|
||||||
{
|
{
|
||||||
ctxMod->modfilesize = dataSize;
|
ctxMod->modfilesize = dataSize;
|
||||||
ctxMod->modfile = newData;
|
ctxMod->modfile = newData;
|
||||||
|
@@ -2910,7 +2910,7 @@ const char *GetFileName(const char *filePath)
|
|||||||
// Get filename string without extension (uses static string)
|
// Get filename string without extension (uses static string)
|
||||||
const char *GetFileNameWithoutExt(const char *filePath)
|
const char *GetFileNameWithoutExt(const char *filePath)
|
||||||
{
|
{
|
||||||
#define MAX_FILENAMEWITHOUTEXT_LENGTH 128
|
#define MAX_FILENAMEWITHOUTEXT_LENGTH 256
|
||||||
|
|
||||||
static char fileName[MAX_FILENAMEWITHOUTEXT_LENGTH] = { 0 };
|
static char fileName[MAX_FILENAMEWITHOUTEXT_LENGTH] = { 0 };
|
||||||
memset(fileName, 0, MAX_FILENAMEWITHOUTEXT_LENGTH);
|
memset(fileName, 0, MAX_FILENAMEWITHOUTEXT_LENGTH);
|
||||||
|
Reference in New Issue
Block a user