Commit e94bfd93 authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Style changes and removed some const declarations of arguments that are not...

Style changes and removed some const declarations of arguments that are not necessary in Portaudio interface. Also progress on ita_whad.
parent 7134dd1c
......@@ -2,8 +2,11 @@
#include <iostream>
#include <stdio.h>
#include <string>
#include <sstream>
#include <ITAAsioInterface.h>
#include <ITAException.h>
#include <ITAPortaudioInterface.h>
using namespace std;
......@@ -23,29 +26,144 @@ int main( int argc, char* argv[] )
#endif // ITA_WHAD_WITH_PORTAUDIO
cout << endl;
stringstream ss;
#ifdef ITA_WHAD_WITH_ASIO
string sFileName = "ita_whad_asio.txt";
FILE* file = fopen( sFileName.c_str(), "w" );
ss.clear();
ss << "[ASIO]" << endl << endl;
ITAsioInitializeLibrary();
long lDrivers = ITAsioGetNumDrivers();
if( lDrivers == 0 )
cerr << "Warning: no ASIO drivers found." << endl;
for( long i = 0; i < lDrivers; i++ )
{
cout << "[" << i+1 << "] \"" << ITAsioGetDriverName(i) << "\"" << endl;
ss << "Driver identifier: " << ITAsioGetDriverName( i ) << endl;
try
{
ASIOError e = ITAsioInitializeDriver( i );
if( e != ASE_OK )
ITA_EXCEPT1( INVALID_PARAMETER, "Could not initialize ASIO driver, audio device not connected?" );
long lMinSize, lMaxSize, lPrefSize, g;
ITAsioGetBufferSize( &lMinSize, &lMaxSize, &lPrefSize, &g );
ss << "Buffer sizes: " << lMinSize << " " << lMaxSize << " " << lPrefSize << " " << g << endl;
ASIOSampleRate fs;
ITAsioGetSampleRate( &fs );
ss << "Samplerate: " << fs << endl;
long in, out;
ITAsioGetChannels( &in, &out );
ss << "Input channels: " << in << endl;
ss << "Output channels: " << out << endl;
}
catch( const ITAException& e )
{
ss << "### ERROR: " << e << endl;
}
ss << endl;
}
ITAsioFinalizeLibrary();
fclose( file );
// Export
string sFileNameASIO = "ita_whad_asio.txt";
FILE* file_asio = fopen( sFileNameASIO.c_str(), "w" );
fwrite( ss.str().c_str(), sizeof( char ), ss.str().length(), file_asio );
fwrite( "\n", sizeof( char ), 1, file_asio );
fclose( file_asio );
cout << "Exported information to file '" << sFileNameASIO << "'" << endl << endl;
#endif // ITA_WHAD_WITH_ASIO
#ifdef ITA_WHAD_WITH_PORTAUDIO
ss.clear();
ss << "[Portaudio]" << endl << endl;
ITAPortaudioInterface oPortaudioFirst( 44100.0f, 512 );
oPortaudioFirst.Initialize();
int iNumDevices = oPortaudioFirst.GetNumDevices();
int iPeferredDefaultBufferSize = oPortaudioFirst.GetPreferredBufferSize();
double dPreferredDefaultSampleRate = oPortaudioFirst.GetSampleRate();
if( iNumDevices == 0 )
cerr << "Warning: no Portaudio drivers found." << endl;
std::vector< double > vdPreferredSampleRates( iNumDevices );
for( int i = 0; i < iNumDevices; i++ )
{
oPortaudioFirst.GetDriverSampleRate( i, vdPreferredSampleRates[ i ] );
}
ss << "Default input device: " << oPortaudioFirst.GetDeviceName( oPortaudioFirst.GetDefaultInputDevice() ) << endl;
ss << "Default output device: " << oPortaudioFirst.GetDeviceName( oPortaudioFirst.GetDefaultOutputDevice() ) << endl;
oPortaudioFirst.Finalize();
for( int i = 0; i < iNumDevices; i++ )
{
try
{
ITAPortaudioInterface oPA( vdPreferredSampleRates[ i ], iPeferredDefaultBufferSize );
ITAPortaudioInterface::ITA_PA_ERRORCODE e = oPA.Initialize( i );
if( e != ITAPortaudioInterface::ITA_PA_NO_ERROR )
ITA_EXCEPT1( INVALID_PARAMETER, "Portaudio error: " + ITAPortaudioInterface::GetErrorCodeString( e ) );
ss << "Driver number: " << i + 1 << endl;
ss << "Driver identifier: " << oPA.GetDeviceName( i ) << endl;
e = oPA.Open();
if( e != ITAPortaudioInterface::ITA_PA_NO_ERROR )
ITA_EXCEPT1( INVALID_PARAMETER, "Portaudio error: " + ITAPortaudioInterface::GetErrorCodeString( e ) );
ss << "Latency: " << oPA.GetDeviceLatency( i ) << endl;
double dSampleRate;
e = oPA.GetDriverSampleRate( i, dSampleRate );
if( e != ITAPortaudioInterface::ITA_PA_NO_ERROR )
ITA_EXCEPT1( INVALID_PARAMETER, "Portaudio error: " + ITAPortaudioInterface::GetErrorCodeString( e ) );
ss << "Sample rate: " << dSampleRate << endl;
int iIn, iOut;
oPA.GetNumChannels( i, iIn, iOut );
ss << "Input channels: " << iIn << endl;
ss << "Output channels: " << iOut << endl;
oPA.Close();
oPA.Finalize();
}
catch( const ITAException& e )
{
ss << "### ERROR: " << e << endl;
}
ss << endl;
}
// Export
string sFileNamePortaudio = "ita_whad_portaudio.txt";
FILE* file_pa = fopen( sFileNamePortaudio.c_str(), "w" );
fwrite( ss.str().c_str(), sizeof( char ), ss.str().length(), file_pa );
fwrite( "\n", sizeof( char ), 1, file_pa );
fclose( file_pa );
cout << "Exported information to file '" << sFileNamePortaudio << "'" << endl << endl;
#endif // ITA_WHAD_WITH_PORTAUDIO
return 0;
}
......@@ -40,7 +40,8 @@ class ITA_DATA_SOURCES_API ITAPortaudioInterface
{
public:
//! ITAPortaudio error code table
typedef enum ITA_PA_ERRORCODE {
typedef enum ITA_PA_ERRORCODE
{
//! Portaudio/ITAPortaudio no error
ITA_PA_NO_ERROR=0,
......@@ -160,19 +161,20 @@ public:
};
//! Portaudio available host APIs
typedef enum ITA_PA_HOST_APIS {
ITA_PA_DIRECT_SOUND=1, //!< Windows DirectSound
ITA_PA_MME=2, //!< Windows MME
ITA_PA_ASIO=3, //!< Windows Steinberg ASIO (recommended: use ITAsioInterface instead)
ITA_PA_SOUND_MANAGER=4, //!< Macintosh Sound Manager
ITA_PA_CORE_AUDIO=5, //!< MacOS CoreAudio
ITA_PA_OSS=7, //!< Linux/Unix OSS
ITA_PA_ALSA=8, //!< Linux/Unix ALSA
ITA_PA_AL=9, //!< Silicon Graphics Irix using AL
ITA_PA_BE_OS=10, //!< BeOS
ITA_PA_WDMKS=11, //!< Windows Driver Model Kernel Streaming driver
ITA_PA_JACK=12, //!< MacOS/Linux/Unix Jack Audio
ITA_PA_WASAPI=13, //!< Windows Audio Session API
typedef enum ITA_PA_HOST_APIS
{
ITA_PA_DIRECT_SOUND = 1, //!< Windows DirectSound
ITA_PA_MME = 2, //!< Windows MME
ITA_PA_ASIO = 3, //!< Windows Steinberg ASIO (recommended: use ITAsioInterface instead)
ITA_PA_SOUND_MANAGER = 4, //!< Macintosh Sound Manager
ITA_PA_CORE_AUDIO = 5, //!< MacOS CoreAudio
ITA_PA_OSS = 7, //!< Linux/Unix OSS
ITA_PA_ALSA = 8, //!< Linux/Unix ALSA
ITA_PA_AL = 9, //!< Silicon Graphics Irix using AL
ITA_PA_BE_OS = 10, //!< BeOS
ITA_PA_WDMKS = 11, //!< Windows Driver Model Kernel Streaming driver
ITA_PA_JACK = 12, //!< MacOS/Linux/Unix Jack Audio
ITA_PA_WASAPI = 13, //!< Windows Audio Session API
ITA_PA_AUDIO_SCIENCE_HPI=14 //!< AudioScience Hardware Programming Interface
};
......@@ -185,7 +187,7 @@ public:
*
* \see #Initialize #Initialize(const int iDriver)
*/
ITAPortaudioInterface(const double dSampleRate, const int iBufferSize);
ITAPortaudioInterface( double dSampleRate, int iBufferSize );
//! Destructor
~ITAPortaudioInterface();
......@@ -201,25 +203,25 @@ public:
ITA_PA_ERRORCODE Initialize();
//! Initialize Portaudio using specified host/driver by id
ITA_PA_ERRORCODE Initialize(const int iDriverID);
ITA_PA_ERRORCODE Initialize( int iDriverID);
//! Initialize Portaudio using specified driver by name
ITA_PA_ERRORCODE Initialize(const std::string& sDriverName);
ITA_PA_ERRORCODE Initialize( const std::string& sDriverName );
//! Use Portaudio with specific input device
ITA_PA_ERRORCODE SetOutputDevice(const int iOutputDevice);
ITA_PA_ERRORCODE SetOutputDevice( int iOutputDevice);
//! Returns true if playback is enabled, false otherwise
bool IsPlaybackEnabled() const;
//! Set playback enabled/disabled
void SetPlaybackEnabled(const bool bEnabled);
void SetPlaybackEnabled( bool bEnabled);
//! Returns true if record is enabled, false otherwise
bool IsRecordEnabled() const;
//! Set record enabled/disabled
void SetRecordEnabled(const bool bEnabled);
void SetRecordEnabled( bool bEnabled);
//! Finalize Portaudio
/**
......@@ -243,7 +245,7 @@ public:
int GetNumDevices() const;
//! Returns the name of the driver avaiable in Portaudio
std::string GetDeviceName(const int iDriverID) const;
std::string GetDeviceName( int iDriverID ) const;
static int GetPreferredBufferSize();
......@@ -252,9 +254,9 @@ public:
* \param iDriverID Identifier of driver
* \return Latency in seconds, -1 if any error with the driver occurs
*/
float GetDeviceLatency(const int iDriverID) const;
float GetDeviceLatency( int iDriverID ) const;
ITA_PA_ERRORCODE GetDriverSampleRate(const int iDeviceID, double& dSampleRate) const;
ITA_PA_ERRORCODE GetDriverSampleRate( int iDeviceID, double& dSampleRate ) const;
//! Returns the name of the current devices in Portaudio
std::string GetInputDeviceName() const;
......@@ -275,31 +277,31 @@ public:
int GetOutputDevice() const;
//! Returns the number of input and output channels
void GetNumChannels(const int iDeviceID, int& iNumInputChannels, int& iNumOutputChannels) const;
void GetNumChannels( const int iDeviceID, int& iNumInputChannels, int& iNumOutputChannels ) const;
//! Returns the number of input channels
/**
* \return Number of input channels (>=0) or #ITA_PA_ERRORCODE (<0)
*/
int GetNumInputChannels(const int iDeviceID) const;
int GetNumInputChannels( const int iDeviceID ) const;
//! Returns the number of output channels
/**
* \return Number of output channels (>=0) or #ITA_PA_ERRORCODE (<0)
*/
int GetNumOutputChannels(const int iDeviceID) const;
int GetNumOutputChannels( int iDeviceID ) const;
//! Returns the sample rate
double GetSampleRate() const;
//! Sets the sample rate
ITA_PA_ERRORCODE SetSampleRate(const double dSampleRate);
ITA_PA_ERRORCODE SetSampleRate( double dSampleRate );
//! Set the playback data source
/**
* \note Enables playback, see IsPlaybackEnabled() and SetPlaybackEnabled()
*/
ITA_PA_ERRORCODE SetPlaybackDatasource(ITADatasource* pidsDatasource);
ITA_PA_ERRORCODE SetPlaybackDatasource( ITADatasource* pidsDatasource );
//! Get the recording data source
/**
......@@ -312,21 +314,23 @@ public:
ITADatasource* GetRecordDatasource();
//! Uses the Portaudio sleep function
void Sleep(const float fSeconds) const;
void Sleep( float fSeconds ) const;
//! Returns a human readable error code string
static std::string GetErrorCodeString(const ITA_PA_ERRORCODE err);
static std::string GetErrorCodeString( ITA_PA_ERRORCODE err );
//! Internal user data class for information exchange with callback function
class ITAPortaudioUserData {
class ITAPortaudioUserData
{
public:
ITADatasource* pdsPlaybackDatasource; //!< ITADatasource playback datasource
ITADatasource* pdsRecordDatasource; //!< ITADatasource record datasource
bool bPlayback; //!< Playback enabled
bool bRecord; //!< Record enabled
ITAPortaudioUserData() {
inline ITAPortaudioUserData()
{
pdsPlaybackDatasource = NULL;
pdsRecordDatasource = NULL;
bPlayback = false;
......@@ -335,7 +339,7 @@ public:
};
private:
//! Standard constructor
//! Standard constructor deactivated
ITAPortaudioInterface();
std::string m_sConfigFile; //!< Configuration file path
......@@ -364,7 +368,6 @@ private:
ITA_PA_ERRORCODE m_iError; //!< Last ITAPortaudio error
};
#endif // INCLUDE_WATCHER_ITA_PORTAUDIO_INTERFACE
......@@ -9,17 +9,18 @@
#include <ITAStreamInfo.h>
// Portaudio Callback Function
static int PortaudioCallbackFunction(const void*, void*, unsigned long, const PaStreamCallbackTimeInfo*, PaStreamCallbackFlags, void*);
static int PortaudioCallbackFunction( const void*, void*, unsigned long, const PaStreamCallbackTimeInfo*, PaStreamCallbackFlags, void* );
class ITAPortaudioSource : public ITADatasourceRealization {
class ITAPortaudioSource : public ITADatasourceRealization
{
public:
ITAPortaudioSource(int iChannels, double dSamplerate, int iBufferSize)
: ITADatasourceRealization((unsigned int) iChannels, dSamplerate, (unsigned int) iBufferSize, 16) {}
ITAPortaudioSource( int iChannels, double dSampleRate, int iBufferSize )
: ITADatasourceRealization( ( unsigned int ) iChannels, dSampleRate, ( unsigned int ) iBufferSize, 16 ) {};
};
ITAPortaudioInterface::ITAPortaudioInterface(const double dSampleRate, const int iBufferSize) :
m_vpPaStream(NULL)
ITAPortaudioInterface::ITAPortaudioInterface( double dSampleRate, int iBufferSize )
: m_vpPaStream( NULL )
{
m_dSampleRate = dSampleRate;
m_iBufferSize = iBufferSize; // Darf 0 sein
......@@ -41,13 +42,17 @@ ITAPortaudioInterface::ITAPortaudioInterface(const double dSampleRate, const int
m_iError = ITA_PA_NO_ERROR;
}
ITAPortaudioInterface::~ITAPortaudioInterface() {
ITAPortaudioInterface::~ITAPortaudioInterface()
{
}
ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Initialize(const std::string& sDriverName) {
ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Initialize( const std::string& sDriverName )
{
return ITA_PA_INVALID_DEVICE;
}
ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Initialize(const int iDriverID) {
ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Initialize( int iDriverID )
{
if (m_bInitialized)
return ITA_PA_IS_INITIALIZED;
......@@ -79,7 +84,8 @@ ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Initialize(const
return ITA_PA_NO_ERROR;
}
ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Initialize() {
ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Initialize()
{
if (m_bInitialized)
return ITA_PA_IS_INITIALIZED;
......@@ -108,11 +114,13 @@ ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Initialize() {
return ITA_PA_NO_ERROR;
}
bool ITAPortaudioInterface::IsPlaybackEnabled() const {
bool ITAPortaudioInterface::IsPlaybackEnabled() const
{
return m_bPlayback;
}
void ITAPortaudioInterface::SetPlaybackEnabled(const bool bEnabled) {
void ITAPortaudioInterface::SetPlaybackEnabled( bool bEnabled )
{
m_bPlayback = bEnabled;
}
......@@ -120,11 +128,13 @@ bool ITAPortaudioInterface::IsRecordEnabled() const {
return m_bRecord;
}
void ITAPortaudioInterface::SetRecordEnabled(const bool bEnabled) {
void ITAPortaudioInterface::SetRecordEnabled( bool bEnabled )
{
m_bRecord = bEnabled;
}
ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Finalize() {
ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Finalize()
{
if (!m_bInitialized)
return ITA_PA_NOT_INITIALIZED;
......@@ -147,7 +157,8 @@ ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Finalize() {
}
ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Open() {
ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Open()
{
if (!m_bInitialized)
return ITA_PA_NOT_INITIALIZED;
......@@ -201,17 +212,21 @@ ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Open() {
m_iError = (ITA_PA_ERRORCODE) Pa_OpenStream(&stream, pInParams, pOutParams, m_dSampleRate, m_iBufferSize, paNoFlag, PortaudioCallbackFunction, &m_oUserData);
if (m_iError == ITA_PA_NO_ERROR) {
if( m_iError == ITA_PA_NO_ERROR )
{
m_vpPaStream = (void*) stream;
m_bOpen = true;
} else {
}
else
{
m_vpPaStream = NULL;
}
return m_iError;
}
ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Close() {
ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Close()
{
if (!m_bInitialized)
return ITA_PA_NOT_INITIALIZED;
......@@ -229,7 +244,8 @@ ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Close() {
return m_iError;
}
ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Start() {
ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Start()
{
if (m_bStreaming)
return ITA_PA_IS_STARTED;
......@@ -253,7 +269,8 @@ ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Start() {
return m_iError;
}
ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Stop() {
ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Stop()
{
if (!m_bStreaming)
return ITA_PA_STREAM_IS_STOPPED;
......@@ -277,7 +294,8 @@ int ITAPortaudioInterface::GetNumDevices() const {
}
int ITAPortaudioInterface::GetNumInputChannels(const int iDeviceID) const {
int ITAPortaudioInterface::GetNumInputChannels( int iDeviceID ) const
{
if (!m_bInitialized)
return ITA_PA_NOT_INITIALIZED;
......@@ -287,7 +305,8 @@ int ITAPortaudioInterface::GetNumInputChannels(const int iDeviceID) const {
return info->maxInputChannels;
}
int ITAPortaudioInterface::GetNumOutputChannels(const int iDeviceID) const {
int ITAPortaudioInterface::GetNumOutputChannels( int iDeviceID ) const
{
if (!m_bInitialized)
return ITA_PA_NOT_INITIALIZED;
......@@ -297,16 +316,19 @@ int ITAPortaudioInterface::GetNumOutputChannels(const int iDeviceID) const {
return info->maxOutputChannels;
}
double ITAPortaudioInterface::GetSampleRate() const {
double ITAPortaudioInterface::GetSampleRate() const
{
return m_dSampleRate;
}
void ITAPortaudioInterface::GetNumChannels(const int iDeviceID, int& iNumInputChannels, int& iNumOutputChannels) const {
void ITAPortaudioInterface::GetNumChannels( int iDeviceID, int& iNumInputChannels, int& iNumOutputChannels ) const
{
iNumInputChannels = GetNumInputChannels(iDeviceID);
iNumOutputChannels = GetNumOutputChannels(iDeviceID);
}
ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::GetDriverSampleRate(const int iDeviceID, double& dSampleRate) const {
ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::GetDriverSampleRate( int iDeviceID, double& dSampleRate ) const
{
if (!m_bInitialized)
return ITA_PA_NOT_INITIALIZED;
......@@ -318,7 +340,8 @@ ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::GetDriverSampleRa
return ITA_PA_NO_ERROR;
}
std::string ITAPortaudioInterface::GetDeviceName(const int iDriverID) const {
std::string ITAPortaudioInterface::GetDeviceName( int iDriverID ) const
{
if (!m_bInitialized)
return "Portaudio not initialized";
......@@ -331,7 +354,8 @@ std::string ITAPortaudioInterface::GetDeviceName(const int iDriverID) const {
return info->name;
}
float ITAPortaudioInterface::GetDeviceLatency(const int iDriverID) const {
float ITAPortaudioInterface::GetDeviceLatency( int iDriverID ) const
{
if (!m_bInitialized)
return -1;
......@@ -344,7 +368,8 @@ float ITAPortaudioInterface::GetDeviceLatency(const int iDriverID) const {
return (float) info->defaultLowOutputLatency;
}
int ITAPortaudioInterface::GetDefaultInputDevice() const {
int ITAPortaudioInterface::GetDefaultInputDevice() const
{
int iDefaultInputDevice;
if (!m_bInitialized) {
Pa_Initialize();
......@@ -357,7 +382,8 @@ int ITAPortaudioInterface::GetDefaultInputDevice() const {
return iDefaultInputDevice;
}
int ITAPortaudioInterface::GetDefaultOutputDevice() const {
int ITAPortaudioInterface::GetDefaultOutputDevice() const
{
int iDefaultOutputDevice;
if (!m_bInitialized) {
Pa_Initialize();
......@@ -370,7 +396,8 @@ int ITAPortaudioInterface::GetDefaultOutputDevice() const {
return iDefaultOutputDevice;
}
ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::SetPlaybackDatasource(ITADatasource* pidsDatasource) {
ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::SetPlaybackDatasource( ITADatasource* pidsDatasource )
{
if (!m_bInitialized)
return ITA_PA_NOT_INITIALIZED;
......@@ -390,7 +417,8 @@ ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::SetPlaybackDataso
return ITA_PA_NO_ERROR;
}
ITADatasource* ITAPortaudioInterface::GetRecordDatasource() {
ITADatasource* ITAPortaudioInterface::GetRecordDatasource()
{
if (!m_bInitialized)
return NULL;
......@@ -405,13 +433,15 @@ ITADatasource* ITAPortaudioInterface::GetRecordDatasource() {
return m_oUserData.pdsRecordDatasource;
}
void ITAPortaudioInterface::Sleep(const float fSeconds) const {
void ITAPortaudioInterface::Sleep( float fSeconds ) const
{
Pa_Sleep((long) fSeconds*1000);
return;
}
std::string ITAPortaudioInterface::GetErrorCodeString(const ITA_PA_ERRORCODE err) {
std::string ITAPortaudioInterface::GetErrorCodeString( ITA_PA_ERRORCODE err )
{
if (err == ITA_PA_NOT_INITIALIZED)
return "Portaudio not initialized";
if (err == ITA_PA_INVALID_CHANNEL_COUNT)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment