From b0a68fd09ff6fa62accdc29307c5f445cc054a94 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 9 Nov 2007 17:11:45 +0000 Subject: optimize mixing code a bit. Add mixers for S32LE, S32BE, ULAW, ALAW and FLOAT32BE. Add volume adjusters for FLOAT32BE, ALAW, ULAW. git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2041 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/pulsecore/sample-util.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/pulsecore/sample-util.h') diff --git a/src/pulsecore/sample-util.h b/src/pulsecore/sample-util.h index 0a39d5ca..2ef8f924 100644 --- a/src/pulsecore/sample-util.h +++ b/src/pulsecore/sample-util.h @@ -39,7 +39,14 @@ typedef struct pa_mix_info { pa_memchunk chunk; pa_cvolume volume; void *userdata; - void *internal; /* Used internally by pa_mix(), should not be initialised when calling pa_mix() */ + + /* The following fields are used internally by pa_mix(), should + * not be initialised by the caller of pa_mix(). */ + void *ptr; + union { + int32_t i; + float f; + } linear[PA_CHANNELS_MAX]; } pa_mix_info; size_t pa_mix( @@ -49,7 +56,7 @@ size_t pa_mix( size_t length, const pa_sample_spec *spec, const pa_cvolume *volume, - int mute); + pa_bool_t mute); void pa_volume_memchunk( pa_memchunk*c, -- cgit