mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 16:24:57 +01:00
Launch pavucontrol as PA's control app
This commit is contained in:
parent
7cf68eaf72
commit
b759fb883e
2 changed files with 29 additions and 2 deletions
|
|
@ -22,11 +22,14 @@
|
|||
#include <stdlib.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <glibmm.h>
|
||||
|
||||
#include "pbd/compose.h"
|
||||
#include "pbd/error.h"
|
||||
#include "pbd/file_utils.h"
|
||||
#include "pbd/pthread_utils.h"
|
||||
|
||||
#include "ardour/port_manager.h"
|
||||
|
|
@ -521,6 +524,30 @@ PulseAudioBackend::midi_option () const
|
|||
return get_standard_device_name (DeviceNone);
|
||||
}
|
||||
|
||||
/* External control app */
|
||||
std::string
|
||||
PulseAudioBackend::control_app_name () const
|
||||
{
|
||||
std::string ignored;
|
||||
if (PBD::find_file (PBD::Searchpath (Glib::getenv("PATH")), X_("pavucontrol"), ignored)) {
|
||||
return "pavucontrol";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
void
|
||||
PulseAudioBackend::launch_control_app ()
|
||||
{
|
||||
#ifdef NO_VFORK
|
||||
(void) system ("pavucontrol");
|
||||
#else
|
||||
if (::vfork () == 0) {
|
||||
::execlp ("pavucontrol", "pavucontrol", (char*)NULL);
|
||||
exit (EXIT_SUCCESS);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/* State Control */
|
||||
|
||||
static void*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue