1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
|
--- src/preferences.c.orig 2015-02-07 23:58:32.000000000 +0100
+++ src/preferences.c 2015-02-22 21:04:58.229180250 +0100
@@ -685,12 +685,6 @@ lives_toggle_button_get_active(LIVES_TOG
jack_rec_audio_to_clip(-1,-1,RECA_EXTERNAL);
}
}
- if (prefs->audio_player==AUD_PLAYER_PULSE) {
- if (prefs->perm_audio_reader) {
- // create reader connection now, if permanent
- pulse_rec_audio_to_clip(-1,-1,RECA_EXTERNAL);
- }
- }
}
}
--- src/callbacks.c.orig 2015-02-08 15:17:58.000000000 +0100
+++ src/callbacks.c 2015-02-22 21:13:44.839218263 +0100
@@ -135,13 +135,6 @@ void lives_exit (void) {
mainw->current_file=-1;
if (!mainw->only_close) {
-#ifdef HAVE_PULSE_AUDIO
- pthread_mutex_lock(&mainw->abuf_mutex);
- if (mainw->pulsed!=NULL) pulse_close_client(mainw->pulsed);
- if (mainw->pulsed_read!=NULL) pulse_close_client(mainw->pulsed_read);
- pulse_shutdown();
- pthread_mutex_unlock(&mainw->abuf_mutex);
-#endif
#ifdef ENABLE_JACK
pthread_mutex_lock(&mainw->abuf_mutex);
lives_jack_end();
@@ -1005,12 +998,6 @@ void on_stop_clicked (LiVESMenuItem *men
return;
}
#endif
-#ifdef HAVE_PULSE_AUDIO
- if (mainw->pulsed!=NULL&&mainw->pulsed_read!=NULL&&mainw->pulsed->in_use) {
- mainw->cancelled=CANCEL_KEEP;
- return;
- }
-#endif
#ifndef IS_MINGW
com=g_strdup_printf("%s stopsubsubs \"%s\" 2>/dev/null",prefs->backend_sync,cfile->handle);
@@ -4016,20 +4003,6 @@ void on_record_perf_activate (LiVESMenuI
}
#endif
-#ifdef HAVE_PULSE_AUDIO
- if (prefs->audio_player==AUD_PLAYER_PULSE) {
- if (mainw->agen_key==0&&!mainw->agen_needs_reinit) {
- pulse_rec_audio_to_clip(mainw->ascrap_file, -1, RECA_EXTERNAL);
- mainw->pulsed_read->in_use=TRUE;
- }
- else {
- if (mainw->pulsed!=NULL) {
- pulse_rec_audio_to_clip(mainw->ascrap_file, -1, RECA_GENERATED);
- mainw->pulsed_read->in_use=TRUE;
- }
- }
- }
-#endif
}
return;
}
@@ -4042,11 +4015,6 @@ void on_record_perf_activate (LiVESMenuI
jack_get_rec_avals(mainw->jackd);
}
#endif
-#ifdef HAVE_PULSE_AUDIO
- if (prefs->audio_player==AUD_PLAYER_PULSE&&mainw->pulsed!=NULL) {
- pulse_get_rec_avals(mainw->pulsed);
- }
-#endif
}
return;
}
@@ -7801,15 +7769,6 @@ void on_loop_cont_activate (LiVESMenuIte
else if (mainw->jackd!=NULL) mainw->jackd->loop=AUDIO_LOOP_NONE;
}
#endif
-#ifdef HAVE_PULSE_AUDIO
- if (prefs->audio_player==AUD_PLAYER_PULSE) {
- if (mainw->pulsed!=NULL&&(mainw->loop_cont||mainw->whentostop==NEVER_STOP)) {
- if (mainw->ping_pong&&prefs->audio_opts&AUDIO_OPTS_FOLLOW_FPS) mainw->pulsed->loop=AUDIO_LOOP_PINGPONG;
- else mainw->pulsed->loop=AUDIO_LOOP_FORWARD;
- }
- else if (mainw->pulsed!=NULL) mainw->pulsed->loop=AUDIO_LOOP_NONE;
- }
-#endif
}
@@ -7822,12 +7781,6 @@ void on_ping_pong_activate (LiVESMenuIte
else mainw->jackd->loop=AUDIO_LOOP_FORWARD;
}
#endif
-#ifdef HAVE_PULSE_AUDIO
- if (prefs->audio_player==AUD_PLAYER_PULSE&&mainw->pulsed!=NULL&&mainw->pulsed->loop!=AUDIO_LOOP_NONE) {
- if (mainw->ping_pong&&prefs->audio_opts&AUDIO_OPTS_FOLLOW_FPS) mainw->pulsed->loop=AUDIO_LOOP_PINGPONG;
- else mainw->pulsed->loop=AUDIO_LOOP_FORWARD;
- }
-#endif
}
@@ -7910,17 +7863,6 @@ void on_mute_activate (LiVESMenuItem *me
}
}
#endif
-#ifdef HAVE_PULSE_AUDIO
- if (prefs->audio_player==AUD_PLAYER_PULSE&&mainw->playing_file>-1&&mainw->pulsed!=NULL) {
- mainw->pulsed->mute=mainw->mute;
- if (mainw->pulsed->playing_file==mainw->current_file&&cfile->achans>0&&!mainw->is_rendering) {
- if (!pulse_audio_seek_bytes(mainw->pulsed, mainw->pulsed->seek_pos)) {
- if (pulse_try_reconnect()) pulse_audio_seek_bytes(mainw->pulsed,mainw->pulsed->seek_pos);
- }
- mainw->pulsed->in_use=TRUE;
- }
- }
-#endif
}
@@ -9287,11 +9229,6 @@ boolean config_event (LiVESWidget *widge
jack_driver_activate(mainw->jackd);
}
#endif
-#ifdef HAVE_PULSE_AUDIO
- if (mainw->pulsed!=NULL) {
- pulse_driver_activate(mainw->pulsed);
- }
-#endif
}
mainw->is_ready=TRUE;
if (palette->style&STYLE_1) widget_opts.apply_theme=TRUE;
@@ -9406,8 +9343,7 @@ void on_effects_paused (LiVESButton *but
d_print(_ ("paused..."));
}
#ifdef RT_AUDIO
- if ((mainw->jackd!=NULL&&mainw->jackd_read!=NULL&&mainw->jackd_read->in_use)
- ||(mainw->pulsed!=NULL&&mainw->pulsed_read!=NULL&&mainw->pulsed_read->in_use))
+ if ((mainw->jackd!=NULL&&mainw->jackd_read!=NULL&&mainw->jackd_read->in_use))
lives_widget_hide(cfile->proc_ptr->stop_button);
#endif
} else {
@@ -9421,16 +9357,14 @@ void on_effects_paused (LiVESButton *but
d_print(_ ("resumed..."));
}
#ifdef RT_AUDIO
- if ((mainw->jackd!=NULL&&mainw->jackd_read!=NULL&&mainw->jackd_read->in_use)
- ||(mainw->pulsed!=NULL&&mainw->pulsed_read!=NULL&&mainw->pulsed_read->in_use))
+ if ((mainw->jackd!=NULL&&mainw->jackd_read!=NULL&&mainw->jackd_read->in_use))
lives_widget_show(cfile->proc_ptr->stop_button);
#endif
}
if (!cfile->opening&&!mainw->internal_messaging
#ifdef RT_AUDIO
- &&!((mainw->jackd!=NULL&&mainw->jackd_read!=NULL&&mainw->jackd_read->in_use)
- ||(mainw->pulsed!=NULL&&mainw->pulsed_read!=NULL&&mainw->pulsed->in_use))
+ &&!((mainw->jackd!=NULL&&mainw->jackd_read!=NULL&&mainw->jackd_read->in_use))
#endif
) {
lives_system(com,FALSE);
@@ -9709,19 +9643,6 @@ void changed_fps_during_pb (LiVESSpinBut
}
}
#endif
-
-#ifdef HAVE_PULSE_AUDIO
- if (prefs->audio_player==AUD_PLAYER_PULSE&&mainw->pulsed!=NULL&&mainw->pulsed->playing_file==mainw->current_file&&
- !(mainw->record&&!mainw->record_paused&&prefs->audio_src==AUDIO_SRC_EXT)) {
-
- mainw->pulsed->in_arate=cfile->arate*cfile->pb_fps/cfile->fps;
- if (mainw->agen_key==0&&!mainw->agen_needs_reinit&&!has_audio_filters(AF_TYPE_NONA)) {
- mainw->rec_aclip=mainw->current_file;
- mainw->rec_avel=cfile->pb_fps/cfile->fps;
- mainw->rec_aseek=(double)mainw->pulsed->seek_pos/(double)(cfile->arate*cfile->achans*cfile->asampsize/8);
- }
- }
-#endif
}
if (cfile->play_paused) {
@@ -10234,14 +10155,6 @@ boolean freeze_callback (LiVESAccelGroup
if (cfile->play_paused) jack_pb_stop();
else jack_pb_start();
#endif
-#ifdef HAVE_PULSE_AUDIO
- if (mainw->pulsed!=NULL&&prefs->audio_player==AUD_PLAYER_PULSE&&prefs->audio_opts&AUDIO_OPTS_FOLLOW_FPS) {
- if (!cfile->play_paused&&mainw->pulsed!=NULL&&mainw->pulsed->playing_file==mainw->current_file) {
- mainw->pulsed->in_arate=cfile->arate*cfile->pb_fps/cfile->fps;
- }
- mainw->pulsed->is_paused=cfile->play_paused;
- }
-#endif
return TRUE;
}
@@ -10274,17 +10187,6 @@ boolean show_sync_callback (LiVESAccelGr
#endif
}
- if (prefs->audio_player==AUD_PLAYER_PULSE) {
-#ifdef HAVE_PULSE_AUDIO
- if (mainw->pulsed!=NULL&&mainw->pulsed->in_use) avsync=(double)mainw->pulsed->seek_pos/
- cfile->arate/cfile->achans/cfile->asampsize*8;
- else return FALSE;
-#else
- return FALSE;
-#endif
- }
- else return FALSE;
-
avsync-=(mainw->actual_frame-1.)/cfile->fps;
msg=g_strdup_printf(_("Audio is ahead of video by %.4f secs. at frame %d, with fps %.4f\n"),
@@ -11518,12 +11420,6 @@ void on_recaudclip_ok_clicked (LiVESButt
mainw->jackd_read->in_use=TRUE;
}
#endif
-#ifdef HAVE_PULSE_AUDIO
- if (prefs->audio_player==AUD_PLAYER_PULSE) {
- pulse_rec_audio_to_clip(mainw->current_file,old_file,type==0?RECA_NEW_CLIP:RECA_EXISTING);
- mainw->pulsed_read->in_use=TRUE;
- }
-#endif
if (type==1) {
// set these again, as playsel may have reset them
|