You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When given a bad (truncated) wave file, audioio_wavefile_get_buffer can return GET_BUFFER_MORE_DATA but set buffer_length to 0.
Run till exit from #0 audioio_wavefile_get_buffer (self=0x20008280,
single_channel=false, channel=<optimized out>, buffer=0x20008210,
buffer_length=buffer_length@entry=0x2003ff74)
at ../../shared-module/audiocore/WaveFile.c:210
0x0005e4a8 in audiosample_get_buffer (sample_obj=<optimized out>,
single_channel=single_channel@entry=false, channel=channel@entry=0 '\000',
buffer=buffer@entry=0x20008210, buffer_length=buffer_length@entry=0x2003ff74)
at ../../shared-module/audiocore/__init__.c:110
110 return audioio_wavefile_get_buffer(file, single_channel, channel, buffer, buffer_length);
Value returned is $8 = GET_BUFFER_MORE_DATA
(gdb) p *buffer_length
$9 = 0
This has become a very bad misbehavior on my I2SOut implementation for nRF, because I keep calling it until a desired number of bytes are supplied or GET_BUFFER_DONE is returned.
Suggested fix: If 0 bytes are returned by f_read, contrary to the information in the wave file header, return GET_BUFER_DONE. I anticipate submitting a pull request for this shortly.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
When given a bad (truncated) wave file, audioio_wavefile_get_buffer can return GET_BUFFER_MORE_DATA but set buffer_length to 0.
This has become a very bad misbehavior on my I2SOut implementation for nRF, because I keep calling it until a desired number of bytes are supplied or GET_BUFFER_DONE is returned.
Suggested fix: If 0 bytes are returned by
f_read
, contrary to the information in the wave file header, return GET_BUFER_DONE. I anticipate submitting a pull request for this shortly.The text was updated successfully, but these errors were encountered: