diff options
Diffstat (limited to 'src/pcm_utils.c')
-rw-r--r-- | src/pcm_utils.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/pcm_utils.c b/src/pcm_utils.c index 4759c20ac..f73df8aef 100644 --- a/src/pcm_utils.c +++ b/src/pcm_utils.c @@ -379,8 +379,6 @@ pcm_convert_16(const struct audio_format *src_format, dest_format->sample_rate, dest_buffer, dest_size, &state->resample); - if (len == 0) - exit(EXIT_FAILURE); } return len; @@ -421,8 +419,6 @@ pcm_convert_24(const struct audio_format *src_format, dest_format->sample_rate, (int32_t*)dest_buffer, dest_size, &state->resample); - if (len == 0) - exit(EXIT_FAILURE); } return len; @@ -461,7 +457,7 @@ size_t pcm_convert_size(const struct audio_format *inFormat, size_t src_size, assert((src_size % audio_format_frame_size(inFormat)) == 0); dest_size /= audio_format_frame_size(inFormat); - dest_size = floor(0.5 + (double)dest_size * ratio); + dest_size = ceil((double)dest_size * ratio); dest_size *= audio_format_frame_size(outFormat); return dest_size; |