revert stack change, update drmp3
This commit is contained in:
parent
b0d403f99e
commit
15e57bae4c
|
|
@ -1596,9 +1596,8 @@ audio/audio_sound_positioning: audio/audio_sound_positioning.c
|
||||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
||||||
--preload-file audio/resources/coin.wav@resources/coin.wav
|
--preload-file audio/resources/coin.wav@resources/coin.wav
|
||||||
|
|
||||||
# spectrum example needs a higher stack, 128kb from the default 64kb
|
|
||||||
audio/audio_spectrum_visualizer: audio/audio_spectrum_visualizer.c
|
audio/audio_spectrum_visualizer: audio/audio_spectrum_visualizer.c
|
||||||
$(CC) -o $@$(EXT) $< -sSTACK_SIZE=131072 $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
||||||
--preload-file audio/resources/shaders/glsl100/fft.fs@resources/shaders/glsl100/fft.fs \
|
--preload-file audio/resources/shaders/glsl100/fft.fs@resources/shaders/glsl100/fft.fs \
|
||||||
--preload-file audio/resources/country.mp3@resources/country.mp3
|
--preload-file audio/resources/country.mp3@resources/country.mp3
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ int main(void)
|
||||||
InitAudioDevice();
|
InitAudioDevice();
|
||||||
SetAudioStreamBufferSizeDefault(AUDIO_STREAM_RING_BUFFER_SIZE);
|
SetAudioStreamBufferSizeDefault(AUDIO_STREAM_RING_BUFFER_SIZE);
|
||||||
|
|
||||||
// WARNING: PLATFORM_WEB requires an increased -sSTACK_SIZE
|
// WARNING: Memory out-of-bounds on PLATFORM_WEB
|
||||||
Wave wav = LoadWave("resources/country.mp3");
|
Wave wav = LoadWave("resources/country.mp3");
|
||||||
WaveFormat(&wav, SAMPLE_RATE, PER_SAMPLE_BIT_DEPTH, MONO);
|
WaveFormat(&wav, SAMPLE_RATE, PER_SAMPLE_BIT_DEPTH, MONO);
|
||||||
|
|
||||||
|
|
|
||||||
9
src/external/dr_mp3.h
vendored
9
src/external/dr_mp3.h
vendored
|
|
@ -4247,7 +4247,7 @@ DRMP3_API drmp3_uint64 drmp3_read_pcm_frames_f32(drmp3* pMP3, drmp3_uint64 frame
|
||||||
#else
|
#else
|
||||||
/* Slow path. Convert from s16 to f32. */
|
/* Slow path. Convert from s16 to f32. */
|
||||||
{
|
{
|
||||||
drmp3_int16 pTempS16[8192];
|
drmp3_int16 pTempS16[1152*2]; /* MP3 frames have a maximum per-channel sample count of 1152. Times 2 to account for stereo. */
|
||||||
drmp3_uint64 totalPCMFramesRead = 0;
|
drmp3_uint64 totalPCMFramesRead = 0;
|
||||||
|
|
||||||
while (totalPCMFramesRead < framesToRead) {
|
while (totalPCMFramesRead < framesToRead) {
|
||||||
|
|
@ -4284,7 +4284,7 @@ DRMP3_API drmp3_uint64 drmp3_read_pcm_frames_s16(drmp3* pMP3, drmp3_uint64 frame
|
||||||
#else
|
#else
|
||||||
/* Slow path. Convert from f32 to s16. */
|
/* Slow path. Convert from f32 to s16. */
|
||||||
{
|
{
|
||||||
float pTempF32[4096];
|
float pTempF32[1152*2]; /* MP3 frames have a maximum per-channel sample count of 1152. Times 2 to account for stereo. */
|
||||||
drmp3_uint64 totalPCMFramesRead = 0;
|
drmp3_uint64 totalPCMFramesRead = 0;
|
||||||
|
|
||||||
while (totalPCMFramesRead < framesToRead) {
|
while (totalPCMFramesRead < framesToRead) {
|
||||||
|
|
@ -4772,7 +4772,7 @@ static float* drmp3__full_read_and_close_f32(drmp3* pMP3, drmp3_config* pConfig,
|
||||||
drmp3_uint64 totalFramesRead = 0;
|
drmp3_uint64 totalFramesRead = 0;
|
||||||
drmp3_uint64 framesCapacity = 0;
|
drmp3_uint64 framesCapacity = 0;
|
||||||
float* pFrames = NULL;
|
float* pFrames = NULL;
|
||||||
float temp[4096];
|
float temp[1152*2]; /* MP3 frames have a maximum per-channel sample count of 1152. Times 2 to account for stereo. */
|
||||||
|
|
||||||
DRMP3_ASSERT(pMP3 != NULL);
|
DRMP3_ASSERT(pMP3 != NULL);
|
||||||
|
|
||||||
|
|
@ -4841,7 +4841,7 @@ static drmp3_int16* drmp3__full_read_and_close_s16(drmp3* pMP3, drmp3_config* pC
|
||||||
drmp3_uint64 totalFramesRead = 0;
|
drmp3_uint64 totalFramesRead = 0;
|
||||||
drmp3_uint64 framesCapacity = 0;
|
drmp3_uint64 framesCapacity = 0;
|
||||||
drmp3_int16* pFrames = NULL;
|
drmp3_int16* pFrames = NULL;
|
||||||
drmp3_int16 temp[4096];
|
drmp3_int16 temp[1152*2]; /* MP3 frames have a maximum per-channel sample count of 1152. Times 2 to account for stereo. */
|
||||||
|
|
||||||
DRMP3_ASSERT(pMP3 != NULL);
|
DRMP3_ASSERT(pMP3 != NULL);
|
||||||
|
|
||||||
|
|
@ -5010,6 +5010,7 @@ DIFFERENCES BETWEEN minimp3 AND dr_mp3
|
||||||
REVISION HISTORY
|
REVISION HISTORY
|
||||||
================
|
================
|
||||||
v0.7.4 - TBD
|
v0.7.4 - TBD
|
||||||
|
- Reduce size of some stack allocations.
|
||||||
- Improvements to SIMD detection.
|
- Improvements to SIMD detection.
|
||||||
|
|
||||||
v0.7.3 - 2026-01-17
|
v0.7.3 - 2026-01-17
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user