summaryrefslogtreecommitdiff
path: root/audio/mixeng.h
diff options
context:
space:
mode:
authorMichael Walle <michael@walle.cc>2011-01-05 01:05:47 +0100
committermalc <av1474@comtv.ru>2011-01-12 18:36:22 +0300
commit00e076795f2d6dfa0c078ff5d5ee5d77190cb4b9 (patch)
tree125088eea53cc55083a5b69e927937b89db22645 /audio/mixeng.h
parent0f136d9e060ad879d0b840274ddfd1955e24fc10 (diff)
downloadqemu-00e076795f2d6dfa0c078ff5d5ee5d77190cb4b9.tar.gz
audio: split sample conversion and volume mixing
Refactor the volume mixing, so it can be reused for capturing devices. Additionally, it removes superfluous multiplications with the nominal volume within the hardware voice code path. Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: malc <av1474@comtv.ru>
Diffstat (limited to 'audio/mixeng.h')
-rw-r--r--audio/mixeng.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/audio/mixeng.h b/audio/mixeng.h
index 4af1dd9891..9de443b01d 100644
--- a/audio/mixeng.h
+++ b/audio/mixeng.h
@@ -33,8 +33,7 @@ struct mixeng_volume { int mute; int64_t r; int64_t l; };
struct st_sample { int64_t l; int64_t r; };
#endif
-typedef void (t_sample) (struct st_sample *dst, const void *src,
- int samples, struct mixeng_volume *vol);
+typedef void (t_sample) (struct st_sample *dst, const void *src, int samples);
typedef void (f_sample) (void *dst, const struct st_sample *src, int samples);
extern t_sample *mixeng_conv[2][2][2][3];
@@ -47,5 +46,6 @@ void st_rate_flow_mix (void *opaque, struct st_sample *ibuf, struct st_sample *o
int *isamp, int *osamp);
void st_rate_stop (void *opaque);
void mixeng_clear (struct st_sample *buf, int len);
+void mixeng_volume (struct st_sample *buf, int len, struct mixeng_volume *vol);
#endif /* mixeng.h */