aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-09-12 02:17:13 -0700
committerEric Wong <normalperson@yhbt.net>2008-09-12 02:17:13 -0700
commit12d4956528b7abd34aa5d827a2f088f6eb45df98 (patch)
tree83c070df37f8d03e562ea9ad0b9274e0d4082351 /src/inputPlugins
parent1b6315e8f6372e7abe1a3eb08b27b2f331aa2728 (diff)
parentcb0253d02dc1d51bc84c65d8c7362c8a18c116f2 (diff)
downloadmpd-12d4956528b7abd34aa5d827a2f088f6eb45df98.tar.gz
mpd-12d4956528b7abd34aa5d827a2f088f6eb45df98.tar.xz
mpd-12d4956528b7abd34aa5d827a2f088f6eb45df98.zip
Merge branch 'mk/client-merge'
* mk/client-merge: (49 commits) client: shorten names of the struct client variables client: simplified client_read() client: client_input_received() returns 0 client: check for COMMAND_RETURN_CLOSE client: renamed local variable "selret" to "ret" client: moved CLOSE/KILL check after client_process_line() client: don't check FD_ISSET(client->fd) on expired client client: removed assert(client->fd)>=0 fix -Wcast-qual -Wwrite-strings warnings playlist: return -1 after assert(0) command: concatenate strings at compile time audio: don't pass "fd" to {en,dis}ableAudioDevice() volume: don't pass "fd" to changeVolumeLevel() directory: printDirectoryInfo() does not call commandError() directory: don't pass fd to traverseAllIn() directory: don't pass fd to traverseAllIn() callbacks playlist: PlaylistInfo() does not call commandError() playlist: don't pass "fd" to storedPlaylist.c functions playlist: don't pass "fd" to playlist.c functions playlist: showPlaylist() and shufflePlaylist() cannot fail ...
Diffstat (limited to 'src/inputPlugins')
-rw-r--r--src/inputPlugins/mod_plugin.c17
-rw-r--r--src/inputPlugins/wavpack_plugin.c12
2 files changed, 21 insertions, 8 deletions
diff --git a/src/inputPlugins/mod_plugin.c b/src/inputPlugins/mod_plugin.c
index 586d87ae9..6b09e3cf0 100644
--- a/src/inputPlugins/mod_plugin.c
+++ b/src/inputPlugins/mod_plugin.c
@@ -48,14 +48,21 @@ static BOOL mod_mpd_IsThere(void)
return 1;
}
+static char drv_name[] = "MPD";
+static char drv_version[] = "MPD Output Driver v0.1";
+
+#if (LIBMIKMOD_VERSION > 0x030106)
+static char drv_alias[] = "mpd";
+#endif
+
static MDRIVER drv_mpd = {
NULL,
- "MPD",
- "MPD Output Driver v0.1",
+ drv_name,
+ drv_version,
0,
255,
#if (LIBMIKMOD_VERSION > 0x030106)
- "mpd", /* Alias */
+ drv_alias,
#if (LIBMIKMOD_VERSION >= 0x030200)
NULL, /* CmdLineHelp */
#endif
@@ -92,6 +99,8 @@ static int mod_mikModInitError;
static int mod_initMikMod(void)
{
+ static char params[] = "";
+
if (mod_mikModInitError)
return -1;
@@ -110,7 +119,7 @@ static int mod_initMikMod(void)
md_mode = (DMODE_SOFT_MUSIC | DMODE_INTERP | DMODE_STEREO |
DMODE_16BITS);
- if (MikMod_Init("")) {
+ if (MikMod_Init(params)) {
ERROR("Could not init MikMod: %s\n",
MikMod_strerror(MikMod_errno));
mod_mikModInitError = 1;
diff --git a/src/inputPlugins/wavpack_plugin.c b/src/inputPlugins/wavpack_plugin.c
index 77339dabd..8bba8ae2b 100644
--- a/src/inputPlugins/wavpack_plugin.c
+++ b/src/inputPlugins/wavpack_plugin.c
@@ -224,34 +224,38 @@ static char *wavpack_tag(WavpackContext *wpc, char *key)
static ReplayGainInfo *wavpack_replaygain(WavpackContext *wpc)
{
+ static char replaygain_track_gain[] = "replaygain_track_gain";
+ static char replaygain_album_gain[] = "replaygain_album_gain";
+ static char replaygain_track_peak[] = "replaygain_track_peak";
+ static char replaygain_album_peak[] = "replaygain_album_peak";
ReplayGainInfo *replayGainInfo;
int found = 0;
char *value;
replayGainInfo = newReplayGainInfo();
- value = wavpack_tag(wpc, "replaygain_track_gain");
+ value = wavpack_tag(wpc, replaygain_track_gain);
if (value) {
replayGainInfo->trackGain = atof(value);
free(value);
found = 1;
}
- value = wavpack_tag(wpc, "replaygain_album_gain");
+ value = wavpack_tag(wpc, replaygain_album_gain);
if (value) {
replayGainInfo->albumGain = atof(value);
free(value);
found = 1;
}
- value = wavpack_tag(wpc, "replaygain_track_peak");
+ value = wavpack_tag(wpc, replaygain_track_peak);
if (value) {
replayGainInfo->trackPeak = atof(value);
free(value);
found = 1;
}
- value = wavpack_tag(wpc, "replaygain_album_peak");
+ value = wavpack_tag(wpc, replaygain_album_peak);
if (value) {
replayGainInfo->albumPeak = atof(value);
free(value);