aboutsummaryrefslogtreecommitdiffstats
path: root/src/audioOutput.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-04-12 04:15:52 +0000
committerEric Wong <normalperson@yhbt.net>2008-04-12 04:15:52 +0000
commit01bf82289659b334a837062aef0c4814e26ed4fb (patch)
tree7f1bbd246e1925af986079fbe380822ccb452da1 /src/audioOutput.c
parenta2380928dbc4d46c7bc3104df2dee47219db4b93 (diff)
downloadmpd-01bf82289659b334a837062aef0c4814e26ed4fb.tar.gz
mpd-01bf82289659b334a837062aef0c4814e26ed4fb.tar.xz
mpd-01bf82289659b334a837062aef0c4814e26ed4fb.zip
use size_t and constant pointer in ao plugins
The audio output plugins should get a constant pointer, because they must not modify the buffer. Since the size is a non-negative buffer size in bytes, we should change its type to size_t. git-svn-id: https://svn.musicpd.org/mpd/trunk@7293 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/audioOutput.c')
-rw-r--r--src/audioOutput.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/audioOutput.c b/src/audioOutput.c
index f0515979e..17da1e9ff 100644
--- a/src/audioOutput.c
+++ b/src/audioOutput.c
@@ -181,8 +181,8 @@ int openAudioOutput(AudioOutput * audioOutput, AudioFormat * audioFormat)
return ret;
}
-static void convertAudioFormat(AudioOutput * audioOutput, char **chunkArgPtr,
- int *sizeArgPtr)
+static void convertAudioFormat(AudioOutput * audioOutput,
+ const char **chunkArgPtr, size_t *sizeArgPtr)
{
size_t size = pcm_sizeOfConvBuffer(&(audioOutput->inAudioFormat),
*sizeArgPtr,
@@ -203,7 +203,8 @@ static void convertAudioFormat(AudioOutput * audioOutput, char **chunkArgPtr,
*chunkArgPtr = audioOutput->convBuffer;
}
-int playAudioOutput(AudioOutput * audioOutput, char *playChunk, int size)
+int playAudioOutput(AudioOutput * audioOutput,
+ const char *playChunk, size_t size)
{
int ret;