mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 08:14:58 +01:00
copy over current Waves version of their backend, along with minor changes in libs/ardour and libs/backend/jack to fit with API changes
This commit is contained in:
parent
38e975d6b1
commit
8d59afb048
25 changed files with 844 additions and 430 deletions
|
|
@ -12,7 +12,6 @@
|
|||
#endif
|
||||
|
||||
#include "WCMRNativeAudio.h"
|
||||
#include "MiscUtils/pthread_utils.h"
|
||||
#include "MiscUtils/safe_delete.h"
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
|
@ -35,15 +34,14 @@
|
|||
//**********************************************************************************************
|
||||
WCMRNativeAudioNoneDevice::WCMRNativeAudioNoneDevice (WCMRAudioDeviceManager *pManager)
|
||||
: WCMRNativeAudioDevice (pManager, false /*useMultiThreading*/)
|
||||
, m_SilenceThread(0)
|
||||
#if defined (PLATFORM_WINDOWS)
|
||||
, _waitableTimerForUsleep (CreateWaitableTimer(NULL, TRUE, NULL))
|
||||
#endif
|
||||
{
|
||||
mark_pthread_inactive (m_SilenceThread);
|
||||
|
||||
m_DeviceName = NONE_DEVICE_NAME;
|
||||
|
||||
m_SamplingRates = boost::assign::list_of (m_CurrentSamplingRate=44100)(48000)(88200)(96000);
|
||||
m_SamplingRates = boost::assign::list_of (m_CurrentSamplingRate=44100)(48000)(88200)(96000)(176400)(192000);
|
||||
|
||||
m_BufferSizes = boost::assign::list_of (32)(64)(128)(m_CurrentBufferSize=256)(512)(1024);
|
||||
|
||||
|
|
@ -139,7 +137,7 @@ WTErr WCMRNativeAudioNoneDevice::SetStreaming (bool newState)
|
|||
|
||||
if (Streaming())
|
||||
{
|
||||
if (is_pthread_active (m_SilenceThread))
|
||||
if (m_SilenceThread)
|
||||
std::cerr << "\t\t\t\t\t !!!!!!!!!!!!!!! Warning: the inactive NONE-DEVICE was streaming!" << std::endl;
|
||||
|
||||
pthread_attr_t attributes;
|
||||
|
|
@ -158,19 +156,19 @@ WTErr WCMRNativeAudioNoneDevice::SetStreaming (bool newState)
|
|||
}
|
||||
|
||||
if (pthread_create (&m_SilenceThread, &attributes, __SilenceThread, this)) {
|
||||
mark_pthread_inactive (m_SilenceThread);
|
||||
m_SilenceThread = 0;
|
||||
std::cerr << "WCMRNativeAudioNoneDevice::SetStreaming (): pthread_create () failed!" << std::endl;
|
||||
return eGenericErr;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!is_pthread_active (m_SilenceThread))
|
||||
if (!m_SilenceThread)
|
||||
{
|
||||
std::cerr << "\t\t\t\t\t !!!!!!!!!!!!!!! Warning: the active NONE-DEVICE was NOT streaming!" << std::endl;
|
||||
}
|
||||
|
||||
while (is_pthread_active (m_SilenceThread))
|
||||
while (m_SilenceThread)
|
||||
{
|
||||
_usleep(1); //now wait for ended thread;
|
||||
}
|
||||
|
|
@ -222,7 +220,7 @@ void WCMRNativeAudioNoneDevice::_SilenceThread()
|
|||
}
|
||||
audioCallbackData.acdCycleStartTimeNanos = cycleEndTimeNanos+1;
|
||||
}
|
||||
mark_pthread_inactive (m_SilenceThread);
|
||||
m_SilenceThread = 0;
|
||||
}
|
||||
|
||||
void* WCMRNativeAudioNoneDevice::__SilenceThread(void *This)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue