2015-06-03 23:14:08 +02:00
|
|
|
--- src/preferences.c.orig 2015-04-17 19:02:11.000000000 +0200
|
|
|
|
+++ src/preferences.c 2015-06-02 14:56:23.861483000 +0200
|
|
|
|
@@ -441,14 +441,6 @@
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
- if (prefs->audio_player==AUD_PLAYER_PULSE) {
|
|
|
|
-#ifdef HAVE_PULSE_AUDIO
|
|
|
|
- if (prefs->perm_audio_reader) {
|
|
|
|
- // create reader connection now, if permanent
|
|
|
|
- pulse_rec_audio_to_clip(-1,-1,RECA_EXTERNAL);
|
|
|
|
- }
|
|
|
|
-#endif
|
|
|
|
- }
|
2015-02-23 10:12:40 +01:00
|
|
|
}
|
|
|
|
|
2015-06-03 23:14:08 +02:00
|
|
|
} else if (!rec_ext_audio&&prefs->audio_src==AUDIO_SRC_EXT) {
|
|
|
|
--- src/callbacks.c.orig 2015-04-17 18:58:35.000000000 +0200
|
|
|
|
+++ src/callbacks.c 2015-06-02 15:09:34.683508000 +0200
|
|
|
|
@@ -147,13 +147,6 @@
|
2015-02-23 10:12:40 +01:00
|
|
|
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();
|
2015-06-03 23:14:08 +02:00
|
|
|
@@ -1022,12 +1015,6 @@
|
2015-02-23 10:12:40 +01:00
|
|
|
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
|
2015-06-03 23:14:08 +02:00
|
|
|
com=lives_strdup_printf("%s stopsubsubs \"%s\" 2>/dev/null",prefs->backend_sync,cfile->handle);
|
|
|
|
@@ -3981,19 +3968,6 @@
|
|
|
|
}
|
2015-02-23 10:12:40 +01:00
|
|
|
|
|
|
|
#endif
|
|
|
|
-#ifdef HAVE_PULSE_AUDIO
|
2015-06-03 23:14:08 +02:00
|
|
|
- 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;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
2015-02-23 10:12:40 +01:00
|
|
|
-#endif
|
2015-06-03 23:14:08 +02:00
|
|
|
}
|
|
|
|
return;
|
2015-02-23 10:12:40 +01:00
|
|
|
}
|
2015-06-03 23:14:08 +02:00
|
|
|
@@ -4006,11 +3980,6 @@
|
|
|
|
jack_get_rec_avals(mainw->jackd);
|
|
|
|
}
|
2015-02-23 10:12:40 +01:00
|
|
|
#endif
|
|
|
|
-#ifdef HAVE_PULSE_AUDIO
|
2015-06-03 23:14:08 +02:00
|
|
|
- if (prefs->audio_player==AUD_PLAYER_PULSE&&mainw->pulsed!=NULL) {
|
|
|
|
- pulse_get_rec_avals(mainw->pulsed);
|
|
|
|
- }
|
|
|
|
-#endif
|
2015-02-23 10:12:40 +01:00
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
2015-06-03 23:14:08 +02:00
|
|
|
@@ -7377,14 +7346,6 @@
|
|
|
|
} else if (mainw->jackd!=NULL) mainw->jackd->loop=AUDIO_LOOP_NONE;
|
2015-02-23 10:12:40 +01:00
|
|
|
}
|
|
|
|
#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;
|
2015-06-03 23:14:08 +02:00
|
|
|
- } else if (mainw->pulsed!=NULL) mainw->pulsed->loop=AUDIO_LOOP_NONE;
|
2015-02-23 10:12:40 +01:00
|
|
|
- }
|
|
|
|
-#endif
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2015-06-03 23:14:08 +02:00
|
|
|
@@ -7397,12 +7358,6 @@
|
2015-02-23 10:12:40 +01:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-06-03 23:14:08 +02:00
|
|
|
@@ -7484,17 +7439,6 @@
|
2015-02-23 10:12:40 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
#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)) {
|
2015-06-03 23:14:08 +02:00
|
|
|
- if (pulse_try_reconnect()) pulse_audio_seek_bytes(mainw->pulsed,mainw->pulsed->seek_pos);
|
2015-02-23 10:12:40 +01:00
|
|
|
- }
|
|
|
|
- mainw->pulsed->in_use=TRUE;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-06-03 23:14:08 +02:00
|
|
|
@@ -9165,11 +9109,6 @@
|
|
|
|
jack_driver_activate(mainw->jackd);
|
2015-02-23 10:12:40 +01:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
-#ifdef HAVE_PULSE_AUDIO
|
|
|
|
- if (mainw->pulsed!=NULL) {
|
2015-06-03 23:14:08 +02:00
|
|
|
- pulse_driver_activate(mainw->pulsed);
|
2015-02-23 10:12:40 +01:00
|
|
|
- }
|
|
|
|
-#endif
|
|
|
|
}
|
|
|
|
mainw->is_ready=TRUE;
|
|
|
|
if (palette->style&STYLE_1) widget_opts.apply_theme=TRUE;
|
2015-06-03 23:14:08 +02:00
|
|
|
@@ -9283,8 +9222,7 @@
|
|
|
|
d_print(_("paused..."));
|
2015-02-23 10:12:40 +01:00
|
|
|
}
|
|
|
|
#ifdef RT_AUDIO
|
|
|
|
- if ((mainw->jackd!=NULL&&mainw->jackd_read!=NULL&&mainw->jackd_read->in_use)
|
2015-06-03 23:14:08 +02:00
|
|
|
- ||(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);
|
2015-02-23 10:12:40 +01:00
|
|
|
#endif
|
|
|
|
} else {
|
2015-06-03 23:14:08 +02:00
|
|
|
@@ -9298,16 +9236,14 @@
|
|
|
|
d_print(_("resumed..."));
|
2015-02-23 10:12:40 +01:00
|
|
|
}
|
|
|
|
#ifdef RT_AUDIO
|
|
|
|
- if ((mainw->jackd!=NULL&&mainw->jackd_read!=NULL&&mainw->jackd_read->in_use)
|
2015-06-03 23:14:08 +02:00
|
|
|
- ||(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);
|
2015-02-23 10:12:40 +01:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!cfile->opening&&!mainw->internal_messaging
|
|
|
|
#ifdef RT_AUDIO
|
2015-06-03 23:14:08 +02:00
|
|
|
- &&!((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))
|
2015-02-23 10:12:40 +01:00
|
|
|
#endif
|
2015-06-03 23:14:08 +02:00
|
|
|
) {
|
2015-02-23 10:12:40 +01:00
|
|
|
lives_system(com,FALSE);
|
2015-06-03 23:14:08 +02:00
|
|
|
@@ -9581,19 +9517,6 @@
|
2015-02-23 10:12:40 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
-
|
|
|
|
-#ifdef HAVE_PULSE_AUDIO
|
|
|
|
- if (prefs->audio_player==AUD_PLAYER_PULSE&&mainw->pulsed!=NULL&&mainw->pulsed->playing_file==mainw->current_file&&
|
2015-06-03 23:14:08 +02:00
|
|
|
- !(mainw->record&&!mainw->record_paused&&prefs->audio_src==AUDIO_SRC_EXT)) {
|
2015-02-23 10:12:40 +01:00
|
|
|
-
|
|
|
|
- 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)) {
|
2015-06-03 23:14:08 +02:00
|
|
|
- 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);
|
2015-02-23 10:12:40 +01:00
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
if (cfile->play_paused) {
|
2015-06-03 23:14:08 +02:00
|
|
|
@@ -10100,14 +10023,6 @@
|
2015-02-23 10:12:40 +01:00
|
|
|
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
|
2015-06-03 23:14:08 +02:00
|
|
|
|
2015-02-23 10:12:40 +01:00
|
|
|
return TRUE;
|
|
|
|
}
|
2015-06-03 23:14:08 +02:00
|
|
|
@@ -10137,16 +10052,6 @@
|
|
|
|
#else
|
|
|
|
return FALSE;
|
2015-02-23 10:12:40 +01:00
|
|
|
#endif
|
2015-06-03 23:14:08 +02:00
|
|
|
- }
|
|
|
|
-
|
2015-02-23 10:12:40 +01:00
|
|
|
- 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/
|
2015-06-03 23:14:08 +02:00
|
|
|
- cfile->arate/cfile->achans/cfile->asampsize*8;
|
2015-02-23 10:12:40 +01:00
|
|
|
- else return FALSE;
|
|
|
|
-#else
|
|
|
|
- return FALSE;
|
|
|
|
-#endif
|
2015-06-03 23:14:08 +02:00
|
|
|
} else return FALSE;
|
2015-02-23 10:12:40 +01:00
|
|
|
|
2015-06-03 23:14:08 +02:00
|
|
|
avsync-=(mainw->actual_frame-1.)/cfile->fps;
|
|
|
|
@@ -11386,12 +11291,6 @@
|
2015-02-23 10:12:40 +01:00
|
|
|
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
|