From 925843cfedcde221207ec1ab78f778dab22325f9 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 1 Sep 2008 20:08:55 -0700 Subject: use deconst_ptr instead of duplicating deconst logic --- src/audioOutputs/audioOutput_shout.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/audioOutputs/audioOutput_shout.c') diff --git a/src/audioOutputs/audioOutput_shout.c b/src/audioOutputs/audioOutput_shout.c index 49d69eebd..c1f784986 100644 --- a/src/audioOutputs/audioOutput_shout.c +++ b/src/audioOutputs/audioOutput_shout.c @@ -390,11 +390,10 @@ static void myShout_closeDevice(AudioOutput * audioOutput) static void addTag(ShoutData *sd, const char *name, char *value) { - if (value) { - union const_hack u; - u.in = name; - vorbis_comment_add_tag(&(sd->vc), u.out, value); - } + if (value) + vorbis_comment_add_tag(&(sd->vc), + (char *)deconst_ptr(name), + value); } static void copyTagToVorbisComment(ShoutData * sd) @@ -637,7 +636,8 @@ static int myShout_play(AudioOutput * audioOutput, for (i = 0; i < samples; i++) { for (j = 0; j < sd->audioFormat->channels; j++) { - vorbbuf[j][i] = (*((mpd_sint16 *) playChunk)) / 32768.0; + vorbbuf[j][i] = + (*((mpd_sint16 *)deconst_ptr(playChunk))) / 32768.0; playChunk += bytes; } } -- cgit v1.2.3