rendered paste body--- audacious-plugins-2.1/src/pulse_audio/pulse_audio.c 2009-07-06 23:40:36.000000000 +0100
+++ /cvs/audacious-plugins/src/pulse_audio/pulse_audio.c 2009-10-25 01:37:30.000000000 +0000
@@ -67,12 +67,10 @@
static char t[256];
gint pos;
char *str, *u;
- Playlist *playlist = aud_playlist_get_active();
+ gint playlist = aud_playlist_get_active();
- pos = aud_playlist_get_position(playlist);
- if (!(str = aud_playlist_get_songtitle(playlist, pos)))
+ if (!(str = aud_playlist_get_title(playlist)))
return "Playback Stream";
-
snprintf(t, sizeof(t), "%s", u = pa_locale_to_utf8(str));
pa_xfree(u);
@@ -613,12 +611,6 @@
if (!pa_sample_spec_valid(&ss))
return FALSE;
- if (!volume_valid) {
- pa_cvolume_reset(&volume, ss.channels);
- volume_valid = 1;
- } else if (volume.channels != ss.channels)
- pa_cvolume_set(&volume, ss.channels, pa_cvolume_avg(&volume));
-
if (!(mainloop = pa_threaded_mainloop_new())) {
AUDDBG("Failed to allocate main loop");
goto fail;
@@ -661,7 +653,8 @@
pa_stream_set_write_callback(stream, stream_request_cb, NULL);
pa_stream_set_latency_update_callback(stream, stream_latency_update_cb, NULL);
- if (pa_stream_connect_playback(stream, NULL, NULL, PA_STREAM_INTERPOLATE_TIMING|PA_STREAM_AUTO_TIMING_UPDATE, &volume, NULL) < 0) {
+ /* Connect stream with sink and default volume */
+ if (pa_stream_connect_playback(stream, NULL, NULL, PA_STREAM_INTERPOLATE_TIMING|PA_STREAM_AUTO_TIMING_UPDATE, NULL, NULL) < 0) {
AUDDBG("Failed to connect stream: %s", pa_strerror(pa_context_errno(context)));
goto unlock_and_fail;
}
@@ -708,7 +701,8 @@
AUDDBG("pa_context_get_sink_input_info() failed: %s", pa_strerror(pa_context_errno(context)));
goto unlock_and_fail;
}
-
+ pa_operation_unref(o);
+
do_trigger = 0;
written = 0;
time_offset_msec = 0;