don't set granulepos, that's pad, mmmkay?
git-svn-id: https://svn.musicpd.org/mpd/trunk@2555 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
c3eabe01da
commit
fb7de941c3
@ -261,7 +261,8 @@ int openAudioDevice(AudioFormat * audioFormat) {
|
|||||||
if(!audioOpened || !isCurrentFormat) {
|
if(!audioOpened || !isCurrentFormat) {
|
||||||
flushAudioBuffer();
|
flushAudioBuffer();
|
||||||
copyAudioFormat(&audio_format, audioFormat);
|
copyAudioFormat(&audio_format, audioFormat);
|
||||||
audioBufferSize = (audio_format.bits/8)*audio_format.channels;
|
audioBufferSize = (audio_format.bits >> 3)*
|
||||||
|
audio_format.channels;
|
||||||
audioBufferSize*= audio_format.sampleRate >> 5;
|
audioBufferSize*= audio_format.sampleRate >> 5;
|
||||||
audioBuffer = realloc(audioBuffer, audioBufferSize);
|
audioBuffer = realloc(audioBuffer, audioBufferSize);
|
||||||
}
|
}
|
||||||
|
@ -340,7 +340,6 @@ static int write_page(ShoutData * sd) {
|
|||||||
if(myShout_handleError(sd, err) < 0) return -1;
|
if(myShout_handleError(sd, err) < 0) return -1;
|
||||||
err = shout_send(sd->shoutConn, sd->og.body, sd->og.body_len);
|
err = shout_send(sd->shoutConn, sd->og.body, sd->og.body_len);
|
||||||
if(myShout_handleError(sd, err) < 0) return -1;
|
if(myShout_handleError(sd, err) < 0) return -1;
|
||||||
shout_sync(sd->shoutConn);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -464,15 +463,11 @@ static int myShout_openDevice(AudioOutput * audioOutput,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void myShout_sendMetadata(ShoutData * sd) {
|
static void myShout_sendMetadata(ShoutData * sd) {
|
||||||
ogg_int64_t granulepos = sd->vd.granulepos;
|
|
||||||
|
|
||||||
if(!sd->opened || !sd->tag) return;
|
if(!sd->opened || !sd->tag) return;
|
||||||
|
|
||||||
clearEncoder(sd);
|
clearEncoder(sd);
|
||||||
if(initEncoder(sd) < 0) return;
|
if(initEncoder(sd) < 0) return;
|
||||||
|
|
||||||
sd->vd.granulepos = granulepos;
|
|
||||||
|
|
||||||
copyTagToVorbisComment(sd);
|
copyTagToVorbisComment(sd);
|
||||||
|
|
||||||
vorbis_analysis_headerout(&(sd->vd), &(sd->vc), &(sd->header_main),
|
vorbis_analysis_headerout(&(sd->vd), &(sd->vc), &(sd->header_main),
|
||||||
|
Loading…
Reference in New Issue
Block a user