diff options
author | Eric Wong <normalperson@yhbt.net> | 2008-09-01 20:13:37 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-09-01 20:13:37 -0700 |
commit | dd7f8a723efa9c9edce951981aef7f3adf814134 (patch) | |
tree | 1c442a63c257f53d0e3f1ff127b98e682c35c4d5 /src/audioOutputs/audioOutput_shout.c | |
parent | cf1f842a4c8f760c4c6a41f0dadc6c173a182d4f (diff) | |
parent | 925843cfedcde221207ec1ab78f778dab22325f9 (diff) | |
download | mpd-dd7f8a723efa9c9edce951981aef7f3adf814134.tar.gz mpd-dd7f8a723efa9c9edce951981aef7f3adf814134.tar.xz mpd-dd7f8a723efa9c9edce951981aef7f3adf814134.zip |
Merge branch 'ew/deconst'
* ew/deconst:
use deconst_ptr instead of duplicating deconst logic
provide a generic deconst_ptr function
Diffstat (limited to '')
-rw-r--r-- | src/audioOutputs/audioOutput_shout.c | 12 |
1 files changed, 6 insertions, 6 deletions
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; } } |