aboutsummaryrefslogtreecommitdiffstats
path: root/src/audioOutput.h
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.h
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.h')
-rw-r--r--src/audioOutput.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/audioOutput.h b/src/audioOutput.h
index 3953d2621..577ba2014 100644
--- a/src/audioOutput.h
+++ b/src/audioOutput.h
@@ -43,7 +43,7 @@ typedef void (*AudioOutputFinishDriverFunc) (AudioOutput * audioOutput);
typedef int (*AudioOutputOpenDeviceFunc) (AudioOutput * audioOutput);
typedef int (*AudioOutputPlayFunc) (AudioOutput * audioOutput,
- char *playChunk, int size);
+ const char *playChunk, size_t size);
typedef void (*AudioOutputDropBufferedAudioFunc) (AudioOutput * audioOutput);
@@ -97,7 +97,8 @@ void unloadAudioOutputPlugin(AudioOutputPlugin * audioOutputPlugin);
int initAudioOutput(AudioOutput *, ConfigParam * param);
int openAudioOutput(AudioOutput * audioOutput, AudioFormat * audioFormat);
-int playAudioOutput(AudioOutput * audioOutput, char *playChunk, int size);
+int playAudioOutput(AudioOutput * audioOutput,
+ const char *playChunk, size_t size);
void dropBufferedAudioOutput(AudioOutput * audioOutput);
void closeAudioOutput(AudioOutput * audioOutput);
void finishAudioOutput(AudioOutput * audioOutput);