aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-04-15 05:56:35 +0000
committerEric Wong <normalperson@yhbt.net>2008-04-15 05:56:35 +0000
commitf201f2c922003dc4d07a7b7d71ca44976ab8eb7c (patch)
tree0677c165fb62e3b2b68eec83bbc04a4116387480
parentdf34beb98d37368c78ea39da6211ac78fd8b4cfa (diff)
downloadmpd-f201f2c922003dc4d07a7b7d71ca44976ab8eb7c.tar.gz
mpd-f201f2c922003dc4d07a7b7d71ca44976ab8eb7c.tar.xz
mpd-f201f2c922003dc4d07a7b7d71ca44976ab8eb7c.zip
more const pointers in pcm_utils.[ch]
git-svn-id: https://svn.musicpd.org/mpd/trunk@7360 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-rw-r--r--src/pcm_utils.c7
-rw-r--r--src/pcm_utils.h7
2 files changed, 8 insertions, 6 deletions
diff --git a/src/pcm_utils.c b/src/pcm_utils.c
index 628c524d2..3cf57def1 100644
--- a/src/pcm_utils.c
+++ b/src/pcm_utils.c
@@ -24,7 +24,7 @@
#include "conf.h"
#include "os_compat.h"
-void pcm_volumeChange(char *buffer, int bufferSize, AudioFormat * format,
+void pcm_volumeChange(char *buffer, int bufferSize, const AudioFormat * format,
int volume)
{
mpd_sint32 temp32;
@@ -389,8 +389,9 @@ static const char *pcm_convertTo16bit(mpd_sint8 bits, const char *inBuffer,
}
/* outFormat bits must be 16 and channels must be 1 or 2! */
-size_t pcm_convertAudioFormat(AudioFormat * inFormat, const char *inBuffer,
- size_t inSize, AudioFormat * outFormat,
+size_t pcm_convertAudioFormat(const AudioFormat * inFormat,
+ const char *inBuffer, size_t inSize,
+ const AudioFormat * outFormat,
char *outBuffer, ConvState *convState)
{
const char *buf;
diff --git a/src/pcm_utils.h b/src/pcm_utils.h
index db7846598..53d268db7 100644
--- a/src/pcm_utils.h
+++ b/src/pcm_utils.h
@@ -42,14 +42,15 @@ typedef struct _ConvState {
int error;
} ConvState;
-void pcm_volumeChange(char *buffer, int bufferSize, AudioFormat * format,
+void pcm_volumeChange(char *buffer, int bufferSize, const AudioFormat * format,
int volume);
void pcm_mix(char *buffer1, const char *buffer2, size_t bufferSize1,
size_t bufferSize2, const AudioFormat * format, float portion1);
-size_t pcm_convertAudioFormat(AudioFormat * inFormat, const char *inBuffer,
- size_t inSize, AudioFormat * outFormat,
+size_t pcm_convertAudioFormat(const AudioFormat * inFormat,
+ const char *inBuffer, size_t inSize,
+ const AudioFormat * outFormat,
char *outBuffer, ConvState *convState);
size_t pcm_sizeOfConvBuffer(const AudioFormat * inFormat, size_t inSize,