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
Documentation doesn't mention what happens if the output buffer is not big enough to hold the samplerate-converted input buffer.
It isn't certain if this will return an error or simply fill the output buffer, correctly making a note of how many input samples have been consumed in the data structure.
It would be very helpful to have this documented, as it would save a development test-cycle.
The text was updated successfully, but these errors were encountered:
The person who wrote the code is rarely the best person to document the API, because the author makes assumptions about it that a newcomer is unlikely to make.
src_process is designed to to not overflow the input or output buffers, and to operate correctly in a loop where it is constantly being called with updated SRC_DATA data.
If you call it with a zero length output buffer, it may consume input (and store it internally, but there is a limit to its internal storage), but it will not generate output and it will not result in an error.
https://github.com/erikd/libsamplerate/blob/master/src/samplerate.h#L86
Doc is here: http://www.mega-nerd.com/SRC/api_simple.html
Documentation doesn't mention what happens if the output buffer is not big enough to hold the samplerate-converted input buffer.
It isn't certain if this will return an error or simply fill the output buffer, correctly making a note of how many input samples have been consumed in the data structure.
It would be very helpful to have this documented, as it would save a development test-cycle.
The text was updated successfully, but these errors were encountered: