From 9d0579996c66273b87baae5ef1bde433f5c1ff71 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 7 Jan 2009 18:05:38 +0100 Subject: pcm_utils: moved code to pcm_volume.c Moved the software volume code to a separate library. --- src/pcm_utils.h | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'src/pcm_utils.h') diff --git a/src/pcm_utils.h b/src/pcm_utils.h index 44ea5aa16..61262048f 100644 --- a/src/pcm_utils.h +++ b/src/pcm_utils.h @@ -29,11 +29,6 @@ struct audio_format; -enum { - /** this value means "100% volume" */ - PCM_VOLUME_1 = 1000, -}; - struct pcm_convert_state { struct pcm_resample_state resample; @@ -57,20 +52,6 @@ pcm_range(int32_t sample, unsigned bits) return sample; } -/** - * Converts a float value (0.0 = silence, 1.0 = 100% volume) to an - * integer volume value (1000 = 100%). - */ -static inline int -pcm_float_to_volume(float volume) -{ - return volume * PCM_VOLUME_1 + 0.5; -} - -void pcm_volume(char *buffer, int bufferSize, - const struct audio_format *format, - int volume); - void pcm_mix(char *buffer1, const char *buffer2, size_t size, const struct audio_format *format, float portion1); -- cgit v1.2.3