diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-08-11 17:10:44 +0200 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-08-20 11:29:48 +0200 |
commit | 3d008961c095cf8d41d2c61d13d446c98c892136 (patch) | |
tree | 3ba9fec15a7f51febd36a791245f6349eea93f05 /src/pulsecore/sample-util.h | |
parent | e71e644eb668b6336dd48d2730839aa3e9f7278e (diff) |
sample-util: move volume code to separate file
Move the volume code into a separate file with the reference C implementations.
Add a function to retrieve the volume function and one to install a new one.
Diffstat (limited to 'src/pulsecore/sample-util.h')
-rw-r--r-- | src/pulsecore/sample-util.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pulsecore/sample-util.h b/src/pulsecore/sample-util.h index 6a306c11..278b88b0 100644 --- a/src/pulsecore/sample-util.h +++ b/src/pulsecore/sample-util.h @@ -86,6 +86,12 @@ void pa_memchunk_dump_to_file(pa_memchunk *c, const char *fn); void pa_memchunk_sine(pa_memchunk *c, pa_mempool *pool, unsigned rate, unsigned freq); +typedef void (*pa_do_volume_func_t) (void *samples, void *volumes, unsigned channels, unsigned length); + +pa_do_volume_func_t pa_get_volume_func(pa_sample_format_t f); +void pa_set_volume_func(pa_sample_format_t f, pa_do_volume_func_t func); + + #define PA_CHANNEL_POSITION_MASK_LEFT \ (PA_CHANNEL_POSITION_MASK(PA_CHANNEL_POSITION_FRONT_LEFT) \ | PA_CHANNEL_POSITION_MASK(PA_CHANNEL_POSITION_REAR_LEFT) \ |