mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 16:46:35 +01:00
[Summary] Made device control panel open request synchronized with other critical device operations. Made device reset correctly when control panel is closed.
Conflicts: gtk2_ardour/tracks_control_panel.logic.cc libs/ardour/ardour/audioengine.h libs/backends/wavesaudio/wavesapi/devicemanager/WCMRPortAudioDeviceManager.cpp
This commit is contained in:
parent
91ae97d5c9
commit
ce069da682
3 changed files with 21 additions and 4 deletions
|
|
@ -106,6 +106,7 @@ class LIBARDOUR_API AudioEngine : public SessionHandlePtr, public PortManager
|
||||||
|
|
||||||
void request_backend_reset();
|
void request_backend_reset();
|
||||||
void request_device_list_update();
|
void request_device_list_update();
|
||||||
|
void launch_device_control_app();
|
||||||
|
|
||||||
bool is_realtime() const;
|
bool is_realtime() const;
|
||||||
bool connected() const;
|
bool connected() const;
|
||||||
|
|
|
||||||
|
|
@ -376,6 +376,16 @@ AudioEngine::process_callback (pframes_t nframes)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
AudioEngine::launch_device_control_app()
|
||||||
|
{
|
||||||
|
if (_state_lock.trylock () ) {
|
||||||
|
_backend->launch_control_app ();
|
||||||
|
_state_lock.unlock ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
AudioEngine::request_backend_reset()
|
AudioEngine::request_backend_reset()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1321,7 +1321,7 @@ WTErr WCMRPortAudioDevice::ShowConfigPanel (void *pParam)
|
||||||
AUTO_FUNC_DEBUG;
|
AUTO_FUNC_DEBUG;
|
||||||
WTErr retVal = eNoErr;
|
WTErr retVal = eNoErr;
|
||||||
|
|
||||||
if (Active())
|
if (Active() && !m_ResetRequested )
|
||||||
{
|
{
|
||||||
#ifdef PLATFORM_WINDOWS
|
#ifdef PLATFORM_WINDOWS
|
||||||
if(Pa_GetHostApiInfo(Pa_GetDeviceInfo(m_DeviceID)->hostApi)->type == paASIO)
|
if(Pa_GetHostApiInfo(Pa_GetDeviceInfo(m_DeviceID)->hostApi)->type == paASIO)
|
||||||
|
|
@ -1329,15 +1329,21 @@ WTErr WCMRPortAudioDevice::ShowConfigPanel (void *pParam)
|
||||||
// stop and deactivate the device
|
// stop and deactivate the device
|
||||||
bool wasStreaming = Streaming();
|
bool wasStreaming = Streaming();
|
||||||
SetActive(false);
|
SetActive(false);
|
||||||
|
|
||||||
// show control panel for the device
|
// show control panel for the device
|
||||||
if (PaAsio_ShowControlPanel (m_DeviceID, pParam) != paNoError)
|
if (PaAsio_ShowControlPanel (m_DeviceID, pParam) != paNoError)
|
||||||
retVal = eGenericErr;
|
retVal = eGenericErr;
|
||||||
// reset device to pick up changes
|
|
||||||
ResetDevice();
|
|
||||||
// restore previous state for the device
|
// restore previous state for the device
|
||||||
SetActive(true);
|
SetActive(true);
|
||||||
if (wasStreaming)
|
if (wasStreaming)
|
||||||
SetStreaming(true);
|
SetStreaming(true);
|
||||||
|
|
||||||
|
|
||||||
|
// reset device to pick up changes
|
||||||
|
if (!m_ResetRequested) {
|
||||||
|
m_pMyManager->NotifyClient (WCMRAudioDeviceManagerClient::RequestReset);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
pParam = pParam;
|
pParam = pParam;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue