diff options
author | Max Kellermann <max@duempel.org> | 2011-10-10 08:11:04 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-10-10 10:24:05 +0200 |
commit | 0847ca4ec2e137d0eaa235d653217e8a913187f8 (patch) | |
tree | 2d00b5b7e7700ee216890b83f86c6528090079a1 /src/pcm_mix.c | |
parent | 572d8d0cc486dce64c0f6239cc27598068c1085d (diff) |
pcm_{mix,volume}: pass only sample_format to pcm_mix()
The other audio_format attributes are not used.
Diffstat (limited to 'src/pcm_mix.c')
-rw-r--r-- | src/pcm_mix.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/pcm_mix.c b/src/pcm_mix.c index 8cdad2c11..b1b4f4f2b 100644 --- a/src/pcm_mix.c +++ b/src/pcm_mix.c @@ -102,9 +102,9 @@ pcm_add_vol_32(int32_t *buffer1, const int32_t *buffer2, static void pcm_add_vol(void *buffer1, const void *buffer2, size_t size, int vol1, int vol2, - const struct audio_format *format) + enum sample_format format) { - switch (format->format) { + switch (format) { case SAMPLE_FORMAT_S8: pcm_add_vol_8((int8_t *)buffer1, (const int8_t *)buffer2, size, vol1, vol2); @@ -127,7 +127,7 @@ pcm_add_vol(void *buffer1, const void *buffer2, size_t size, default: MPD_ERROR("format %s not supported by pcm_add_vol", - sample_format_to_string(format->format)); + sample_format_to_string(format)); } } @@ -189,9 +189,9 @@ pcm_add_32(int32_t *buffer1, const int32_t *buffer2, unsigned num_samples) static void pcm_add(void *buffer1, const void *buffer2, size_t size, - const struct audio_format *format) + enum sample_format format) { - switch (format->format) { + switch (format) { case SAMPLE_FORMAT_S8: pcm_add_8((int8_t *)buffer1, (const int8_t *)buffer2, size); break; @@ -210,13 +210,13 @@ pcm_add(void *buffer1, const void *buffer2, size_t size, default: MPD_ERROR("format %s not supported by pcm_add", - sample_format_to_string(format->format)); + sample_format_to_string(format)); } } void pcm_mix(void *buffer1, const void *buffer2, size_t size, - const struct audio_format *format, float portion1) + enum sample_format format, float portion1) { int vol1; float s; |