use size_t in audio.c

Buffer sizes should be size_t.  This is safe here, at least not
unsafer than without the patch.  I have no idea why audioBufferSize
and audioBufferPos were explicitly declared as signed integer.

git-svn-id: https://svn.musicpd.org/mpd/trunk@7296 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
Max Kellermann 2008-04-12 04:16:08 +00:00 committed by Eric Wong
parent c9d80d6090
commit 1ad2f07a39
2 changed files with 5 additions and 5 deletions

View File

@ -49,9 +49,9 @@ static mpd_uint8 *audioDeviceStates;
static mpd_uint8 audioOpened;
static mpd_sint32 audioBufferSize;
static size_t audioBufferSize;
static char *audioBuffer;
static mpd_sint32 audioBufferPos;
static size_t audioBufferPos;
unsigned int audio_device_count(void)
{
@ -358,9 +358,9 @@ int openAudioDevice(AudioFormat * audioFormat)
return ret;
}
int playAudio(const char *playChunk, int size)
int playAudio(const char *playChunk, size_t size)
{
int send_size;
size_t send_size;
while (size > 0) {
send_size = audioBufferSize - audioBufferPos;

View File

@ -59,7 +59,7 @@ void finishAudioDriver(void);
int openAudioDevice(AudioFormat * audioFormat);
int playAudio(const char *playChunk, int size);
int playAudio(const char *playChunk, size_t size);
void dropBufferedAudio(void);