aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-01-01 10:10:02 +0000
committerEric Wong <normalperson@yhbt.net>2008-01-01 10:10:02 +0000
commit4c88ef34bb51adb9ac737f4f58521512c08b76a0 (patch)
tree4ddacb63089f85a52ee15eae00355c6a45407519 /src
parent2cc59816a6e6304e643bc5c7ca055dd2567cba9e (diff)
downloadmpd-4c88ef34bb51adb9ac737f4f58521512c08b76a0.tar.gz
mpd-4c88ef34bb51adb9ac737f4f58521512c08b76a0.tar.xz
mpd-4c88ef34bb51adb9ac737f4f58521512c08b76a0.zip
silence is constant, as is the buffer we pass to playAudio
git-svn-id: https://svn.musicpd.org/mpd/trunk@7123 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src')
-rw-r--r--src/audio.c2
-rw-r--r--src/audio.h2
-rw-r--r--src/decode.c4
3 files changed, 3 insertions, 5 deletions
diff --git a/src/audio.c b/src/audio.c
index a2d21edd3..16367efa0 100644
--- a/src/audio.c
+++ b/src/audio.c
@@ -366,7 +366,7 @@ int openAudioDevice(AudioFormat * audioFormat)
return ret;
}
-int playAudio(char *playChunk, int size)
+int playAudio(const char *playChunk, int size)
{
int send;
diff --git a/src/audio.h b/src/audio.h
index cc4ac0752..3663d289d 100644
--- a/src/audio.h
+++ b/src/audio.h
@@ -55,7 +55,7 @@ void finishAudioDriver(void);
int openAudioDevice(AudioFormat * audioFormat);
-int playAudio(char *playChunk, int size);
+int playAudio(const char *playChunk, int size);
void dropBufferedAudio(void);
diff --git a/src/decode.c b/src/decode.c
index 76bb1bede..47bff4504 100644
--- a/src/decode.c
+++ b/src/decode.c
@@ -510,7 +510,7 @@ static void decodeParent(PlayerControl * pc, DecoderControl * dc, OutputBuffer *
int nextChunk = -1;
int test;
int decodeWaitedOn = 0;
- char silence[CHUNK_SIZE];
+ static const char silence[CHUNK_SIZE];
double sizeToTime = 0.0;
int previousMetadataChunk = -1;
MetadataChunk currentMetadataChunk;
@@ -518,8 +518,6 @@ static void decodeParent(PlayerControl * pc, DecoderControl * dc, OutputBuffer *
int end;
int next = -1;
- memset(silence, 0, CHUNK_SIZE);
-
if (waitOnDecode(pc, dc, cb, &decodeWaitedOn) < 0)
return;