aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-01-26 12:46:21 +0000
committerEric Wong <normalperson@yhbt.net>2008-01-26 12:46:21 +0000
commit07adb14e3c4daa8b1e6ebc69e54128b38b014d30 (patch)
tree7d22b4b2eb31a9bf46cf648731fe1370005ab1c9 /src/inputPlugins
parent28008e697720bb2b11989bb887eb468b91409b1a (diff)
downloadmpd-07adb14e3c4daa8b1e6ebc69e54128b38b014d30.tar.gz
mpd-07adb14e3c4daa8b1e6ebc69e54128b38b014d30.tar.xz
mpd-07adb14e3c4daa8b1e6ebc69e54128b38b014d30.zip
fixed -Wshadow warnings
Signed-off-by: Eric Wong <normalperson@yhbt.net> git-svn-id: https://svn.musicpd.org/mpd/trunk@7143 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/inputPlugins/_flac_common.c12
-rw-r--r--src/inputPlugins/audiofile_plugin.c12
-rw-r--r--src/inputPlugins/mod_plugin.c8
-rw-r--r--src/inputPlugins/mp3_plugin.c16
-rw-r--r--src/inputPlugins/mpc_plugin.c22
5 files changed, 35 insertions, 35 deletions
diff --git a/src/inputPlugins/_flac_common.c b/src/inputPlugins/_flac_common.c
index 9a415f4b6..0a2adf6b7 100644
--- a/src/inputPlugins/_flac_common.c
+++ b/src/inputPlugins/_flac_common.c
@@ -62,12 +62,12 @@ static int flacFindVorbisCommentFloat(const FLAC__StreamMetadata * block,
- pos;
if (len > 0) {
unsigned char tmp;
- unsigned char *dup = &(block->data.vorbis_comment.
- comments[offset].entry[pos]);
- tmp = dup[len];
- dup[len] = '\0';
- *fl = atof((char *)dup);
- dup[len] = tmp;
+ unsigned char *p = &(block->data.vorbis_comment.
+ comments[offset].entry[pos]);
+ tmp = p[len];
+ p[len] = '\0';
+ *fl = atof((char *)p);
+ p[len] = tmp;
return 1;
}
diff --git a/src/inputPlugins/audiofile_plugin.c b/src/inputPlugins/audiofile_plugin.c
index 8527a47a9..b5555f87d 100644
--- a/src/inputPlugins/audiofile_plugin.c
+++ b/src/inputPlugins/audiofile_plugin.c
@@ -33,16 +33,16 @@
static int getAudiofileTotalTime(char *file)
{
- int time;
+ int total_time;
AFfilehandle af_fp = afOpenFile(file, "r", NULL);
if (af_fp == AF_NULL_FILEHANDLE) {
return -1;
}
- time = (int)
+ total_time = (int)
((double)afGetFrameCount(af_fp, AF_DEFAULT_TRACK)
/ afGetRate(af_fp, AF_DEFAULT_TRACK));
afCloseFile(af_fp);
- return time;
+ return total_time;
}
static int audiofile_decode(OutputBuffer * cb, DecoderControl * dc, char *path)
@@ -134,12 +134,12 @@ static int audiofile_decode(OutputBuffer * cb, DecoderControl * dc, char *path)
static MpdTag *audiofileTagDup(char *file)
{
MpdTag *ret = NULL;
- int time = getAudiofileTotalTime(file);
+ int total_time = getAudiofileTotalTime(file);
- if (time >= 0) {
+ if (total_time >= 0) {
if (!ret)
ret = newMpdTag();
- ret->time = time;
+ ret->time = total_time;
} else {
DEBUG
("audiofileTagDup: Failed to get total song time from: %s\n",
diff --git a/src/inputPlugins/mod_plugin.c b/src/inputPlugins/mod_plugin.c
index 0c01caadb..092d9bd55 100644
--- a/src/inputPlugins/mod_plugin.c
+++ b/src/inputPlugins/mod_plugin.c
@@ -166,7 +166,7 @@ static void mod_close(mod_Data * data)
static int mod_decode(OutputBuffer * cb, DecoderControl * dc, char *path)
{
mod_Data *data;
- float time = 0.0;
+ float total_time = 0.0;
int ret;
float secPerByte;
@@ -203,10 +203,10 @@ static int mod_decode(OutputBuffer * cb, DecoderControl * dc, char *path)
break;
ret = VC_WriteBytes(data->audio_buffer, MIKMOD_FRAME_SIZE);
- time += ret * secPerByte;
+ total_time += ret * secPerByte;
sendDataToOutputBuffer(cb, NULL, dc, 0,
- (char *)data->audio_buffer, ret, time,
- 0, NULL);
+ (char *)data->audio_buffer, ret,
+ total_time, 0, NULL);
}
flushOutputBuffer(cb);
diff --git a/src/inputPlugins/mp3_plugin.c b/src/inputPlugins/mp3_plugin.c
index 9bb3f2f4b..2d101f616 100644
--- a/src/inputPlugins/mp3_plugin.c
+++ b/src/inputPlugins/mp3_plugin.c
@@ -69,7 +69,7 @@ static signed long audio_linear_dither(unsigned int bits, mad_fixed_t sample,
struct audio_dither *dither)
{
unsigned int scalebits;
- mad_fixed_t output, mask, random;
+ mad_fixed_t output, mask, rnd;
enum {
MIN = -MAD_F_ONE,
@@ -86,10 +86,10 @@ static signed long audio_linear_dither(unsigned int bits, mad_fixed_t sample,
scalebits = MAD_F_FRACBITS + 1 - bits;
mask = (1L << scalebits) - 1;
- random = prng(dither->random);
- output += (random & mask) - (dither->random & mask);
+ rnd = prng(dither->random);
+ output += (rnd & mask) - (dither->random & mask);
- dither->random = random;
+ dither->random = rnd;
if (output > MAX) {
output = MAX;
@@ -1093,16 +1093,16 @@ static int mp3_decode(OutputBuffer * cb, DecoderControl * dc,
static MpdTag *mp3_tagDup(char *file)
{
MpdTag *ret = NULL;
- int time;
+ int total_time;
ret = id3Dup(file);
- time = getMp3TotalTime(file);
+ total_time = getMp3TotalTime(file);
- if (time >= 0) {
+ if (total_time >= 0) {
if (!ret)
ret = newMpdTag();
- ret->time = time;
+ ret->time = total_time;
} else {
DEBUG("mp3_tagDup: Failed to get total song time from: %s\n",
file);
diff --git a/src/inputPlugins/mpc_plugin.c b/src/inputPlugins/mpc_plugin.c
index 0d18c113a..db217f888 100644
--- a/src/inputPlugins/mpc_plugin.c
+++ b/src/inputPlugins/mpc_plugin.c
@@ -134,7 +134,7 @@ static int mpc_decode(OutputBuffer * cb, DecoderControl * dc,
unsigned long samplePos = 0;
mpc_uint32_t vbrUpdateAcc;
mpc_uint32_t vbrUpdateBits;
- float time;
+ float total_time;
int i;
ReplayGainInfo *replayGainInfo = NULL;
@@ -218,7 +218,7 @@ static int mpc_decode(OutputBuffer * cb, DecoderControl * dc,
s16++;
if (chunkpos >= MPC_CHUNK_SIZE) {
- time = ((float)samplePos) /
+ total_time = ((float)samplePos) /
dc->audioFormat.sampleRate;
bitRate = vbrUpdateBits *
@@ -227,7 +227,7 @@ static int mpc_decode(OutputBuffer * cb, DecoderControl * dc,
sendDataToOutputBuffer(cb, inStream, dc,
inStream->seekable,
chunk, chunkpos,
- time,
+ total_time,
bitRate, replayGainInfo);
chunkpos = 0;
@@ -241,13 +241,13 @@ static int mpc_decode(OutputBuffer * cb, DecoderControl * dc,
}
if (!dc->stop && chunkpos > 0) {
- time = ((float)samplePos) / dc->audioFormat.sampleRate;
+ total_time = ((float)samplePos) / dc->audioFormat.sampleRate;
bitRate =
vbrUpdateBits * dc->audioFormat.sampleRate / 1152 / 1000;
sendDataToOutputBuffer(cb, NULL, dc, inStream->seekable,
- chunk, chunkpos, time, bitRate,
+ chunk, chunkpos, total_time, bitRate,
replayGainInfo);
}
@@ -261,7 +261,7 @@ static int mpc_decode(OutputBuffer * cb, DecoderControl * dc,
static float mpcGetTime(char *file)
{
InputStream inStream;
- float time = -1;
+ float total_time = -1;
mpc_reader reader;
mpc_streaminfo info;
@@ -289,19 +289,19 @@ static float mpcGetTime(char *file)
return -1;
}
- time = mpc_streaminfo_get_length(&info);
+ total_time = mpc_streaminfo_get_length(&info);
closeInputStream(&inStream);
- return time;
+ return total_time;
}
static MpdTag *mpcTagDup(char *file)
{
MpdTag *ret = NULL;
- float time = mpcGetTime(file);
+ float total_time = mpcGetTime(file);
- if (time < 0) {
+ if (total_time < 0) {
DEBUG("mpcTagDup: Failed to get Songlength of file: %s\n",
file);
return NULL;
@@ -312,7 +312,7 @@ static MpdTag *mpcTagDup(char *file)
ret = id3Dup(file);
if (!ret)
ret = newMpdTag();
- ret->time = time;
+ ret->time = total_time;
return ret;
}