# HG changeset patch # User William Pitcock # Date 1198453853 21600 # Node ID f51a47e53d4fde5e2066d30d7f9c0b03cf6d383d # Parent b71d8bee88826e75baa3d783e63430203d053111 Gapless audio fixes. diff -r b71d8bee8882 -r f51a47e53d4f src/pulse_audio/pulse_audio.c --- a/src/pulse_audio/pulse_audio.c Fri Dec 21 12:17:25 2007 -0600 +++ b/src/pulse_audio/pulse_audio.c Sun Dec 23 17:50:53 2007 -0600 @@ -70,7 +70,7 @@ static const char* get_song_name(void) { static char t[256]; - gint session, pos; + gint pos; char *str, *u; Playlist *playlist = aud_playlist_get_active(); @@ -416,6 +416,11 @@ pa_threaded_mainloop_lock(mainloop); CHECK_DEAD_GOTO(fail, 1); + /* gapless playback: new stream, reset the title. --nenolod */ + if (time == 0) { + pa_stream_set_name(stream, get_song_name(), stream_success_cb, &success); + } + if (!(o = pa_stream_flush(stream, stream_success_cb, &success))) { g_warning("pa_stream_flush() failed: %s", pa_strerror(pa_context_errno(context))); goto fail;