filter/volume: assign dest_size_r early, eliminate one
This commit is contained in:
parent
f672657388
commit
f4e9275f7c
@ -98,14 +98,13 @@ volume_filter_filter(struct filter *_filter, const void *src, size_t src_size,
|
|||||||
bool success;
|
bool success;
|
||||||
void *dest;
|
void *dest;
|
||||||
|
|
||||||
if (filter->volume >= PCM_VOLUME_1) {
|
*dest_size_r = src_size;
|
||||||
|
|
||||||
|
if (filter->volume >= PCM_VOLUME_1)
|
||||||
/* optimized special case: 100% volume = no-op */
|
/* optimized special case: 100% volume = no-op */
|
||||||
*dest_size_r = src_size;
|
|
||||||
return src;
|
return src;
|
||||||
}
|
|
||||||
|
|
||||||
dest = pcm_buffer_get(&filter->buffer, src_size);
|
dest = pcm_buffer_get(&filter->buffer, src_size);
|
||||||
*dest_size_r = src_size;
|
|
||||||
|
|
||||||
if (filter->volume <= 0) {
|
if (filter->volume <= 0) {
|
||||||
/* optimized special case: 0% volume = memset(0) */
|
/* optimized special case: 0% volume = memset(0) */
|
||||||
|
Loading…
Reference in New Issue
Block a user