mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-29 22:48:31 +00:00
Updated log output info
This commit is contained in:
11
src/audio.c
11
src/audio.c
@@ -528,7 +528,7 @@ Sound LoadSound(char *fileName)
|
|||||||
// Attach sound buffer to source
|
// Attach sound buffer to source
|
||||||
alSourcei(source, AL_BUFFER, buffer);
|
alSourcei(source, AL_BUFFER, buffer);
|
||||||
|
|
||||||
TraceLog(INFO, "[%s] Sound file loaded successfully (SampleRate: %i, BitRate: %i, Channels: %i)", fileName, wave.sampleRate, wave.bitsPerSample, wave.channels);
|
TraceLog(INFO, "[SND ID %i][BUFR ID %i] Sound file loaded successfully (SampleRate: %i, BitRate: %i, Channels: %i)", source, buffer, wave.sampleRate, wave.bitsPerSample, wave.channels);
|
||||||
|
|
||||||
// Unallocate WAV data
|
// Unallocate WAV data
|
||||||
UnloadWave(wave);
|
UnloadWave(wave);
|
||||||
@@ -759,7 +759,7 @@ void UnloadSound(Sound sound)
|
|||||||
alDeleteSources(1, &sound.source);
|
alDeleteSources(1, &sound.source);
|
||||||
alDeleteBuffers(1, &sound.buffer);
|
alDeleteBuffers(1, &sound.buffer);
|
||||||
|
|
||||||
TraceLog(INFO, "Unloaded sound data");
|
TraceLog(INFO, "[SND ID %i][BUFR ID %i] Unloaded sound data from RAM", sound.source, sound.buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Play a sound
|
// Play a sound
|
||||||
@@ -852,14 +852,13 @@ int PlayMusicStream(int index, char *fileName)
|
|||||||
// Get file info
|
// Get file info
|
||||||
stb_vorbis_info info = stb_vorbis_get_info(musicStreams[index].stream);
|
stb_vorbis_info info = stb_vorbis_get_info(musicStreams[index].stream);
|
||||||
|
|
||||||
TraceLog(INFO, "[%s] Ogg sample rate: %i", fileName, info.sample_rate);
|
TraceLog(DEBUG, "[%s] Ogg sample rate: %i", fileName, info.sample_rate);
|
||||||
TraceLog(INFO, "[%s] Ogg channels: %i", fileName, info.channels);
|
TraceLog(DEBUG, "[%s] Ogg channels: %i", fileName, info.channels);
|
||||||
TraceLog(DEBUG, "[%s] Temp memory required: %i", fileName, info.temp_memory_required);
|
TraceLog(DEBUG, "[%s] Temp memory required: %i", fileName, info.temp_memory_required);
|
||||||
|
|
||||||
musicStreams[index].loop = true; // We loop by default
|
musicStreams[index].loop = true; // We loop by default
|
||||||
musicStreams[index].enabled = true;
|
musicStreams[index].enabled = true;
|
||||||
|
|
||||||
|
|
||||||
musicStreams[index].totalSamplesLeft = (unsigned int)stb_vorbis_stream_length_in_samples(musicStreams[index].stream) * info.channels;
|
musicStreams[index].totalSamplesLeft = (unsigned int)stb_vorbis_stream_length_in_samples(musicStreams[index].stream) * info.channels;
|
||||||
musicStreams[index].totalLengthSeconds = stb_vorbis_stream_length_in_seconds(musicStreams[index].stream);
|
musicStreams[index].totalLengthSeconds = stb_vorbis_stream_length_in_seconds(musicStreams[index].stream);
|
||||||
|
|
||||||
@@ -1369,7 +1368,7 @@ static void UnloadWave(Wave wave)
|
|||||||
{
|
{
|
||||||
free(wave.data);
|
free(wave.data);
|
||||||
|
|
||||||
TraceLog(INFO, "Unloaded wave data");
|
TraceLog(INFO, "Unloaded wave data from RAM");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Some required functions for audio standalone module version
|
// Some required functions for audio standalone module version
|
||||||
|
Reference in New Issue
Block a user