Commit 2ad5ed65 authored by Jonas Stienen's avatar Jonas Stienen
Browse files
parents e734ab5a d2facd72
...@@ -100,6 +100,11 @@ vista_create_default_info_file( ITADataSources ) ...@@ -100,6 +100,11 @@ vista_create_default_info_file( ITADataSources )
set_property( TARGET ITADataSources PROPERTY FOLDER "ITACoreLibs" ) set_property( TARGET ITADataSources PROPERTY FOLDER "ITACoreLibs" )
# apps
set( ITADATASOURCES_COMMON_BUILD TRUE )
add_subdirectory( "${CMAKE_CURRENT_SOURCE_DIR}/apps/ita_whad" )
# tests # tests
set( ITADATASOURCES_COMMON_BUILD TRUE ) set( ITADATASOURCES_COMMON_BUILD TRUE )
add_subdirectory( "${CMAKE_CURRENT_SOURCE_DIR}/tests" ) add_subdirectory( "${CMAKE_CURRENT_SOURCE_DIR}/tests" )
cmake_minimum_required( VERSION 2.8 )
if( NOT ITADATASOURCES_COMMON_BUILD )
project( ita_whad )
list( APPEND CMAKE_MODULE_PATH "$ENV{VISTA_CMAKE_COMMON}" )
include( VistaCommon )
endif()
vista_use_package( ITADataSources REQUIRED FIND_DEPENDENCIES )
if( ITA_DATA_SOURCE_WITH_INTEGRATED_ASIO )
add_definitions( "-DITA_WHAD_WITH_ASIO" )
endif( ITA_DATA_SOURCE_WITH_INTEGRATED_ASIO )
if( ITA_DATA_SOURCE_WITH_INTEGRATED_PORTAUDIO )
add_definitions( "-DITA_WHAD_WITH_PORTAUDIO" )
endif( ITA_DATA_SOURCE_WITH_INTEGRATED_PORTAUDIO )
add_definitions( -DITA_DATA_SOURCES_DLL )
add_executable( ita_whad main.cpp )
target_link_libraries( ita_whad ${VISTA_USE_PACKAGE_LIBRARIES} )
vista_configure_app( ita_whad )
vista_install( ita_whad )
vista_create_default_info_file( ita_whad )
set_property( TARGET ita_whad PROPERTY FOLDER "ITAApps/ITADataSources" )
//#include <conio.h>
#include <iostream>
#include <stdio.h>
#include <string>
#include <ITAAsioInterface.h>
using namespace std;
int main( int, char** )
{
cout << "ita_whad - ITA's which audio devices application" << endl;
cout << " ... lists all available audio devices and available properties." << endl << endl;
#ifdef ITA_WHAD_WITH_ASIO
cout << "ASIO support: yes" << endl;
#else
cout << "ASIO support: no" << endl;
#endif // ITA_WHAD_WITH_ASIO
#ifdef ITA_WHAD_WITH_PORTAUDIO
cout << "Portaudio support: yes" << endl;
#else
cout << "Portaudio support: no" << endl;
#endif // ITA_WHAD_WITH_PORTAUDIO
cout << endl;
#ifdef ITA_WHAD_WITH_ASIO
string sFileName = "ita_whad_asio.txt";
FILE* file = fopen( sFileName.c_str(), "w" );
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;
}
ITAsioFinalizeLibrary();
fclose( file );
#endif // ITA_WHAD_WITH_ASIO
return 0;
}
...@@ -40,7 +40,8 @@ class ITA_DATA_SOURCES_API ITAPortaudioInterface ...@@ -40,7 +40,8 @@ class ITA_DATA_SOURCES_API ITAPortaudioInterface
{ {
public: public:
//! ITAPortaudio error code table //! ITAPortaudio error code table
typedef enum ITA_PA_ERRORCODE { typedef enum ITA_PA_ERRORCODE
{
//! Portaudio/ITAPortaudio no error //! Portaudio/ITAPortaudio no error
ITA_PA_NO_ERROR=0, ITA_PA_NO_ERROR=0,
...@@ -160,19 +161,20 @@ public: ...@@ -160,19 +161,20 @@ public:
}; };
//! Portaudio available host APIs //! Portaudio available host APIs
typedef enum ITA_PA_HOST_APIS { typedef enum ITA_PA_HOST_APIS
ITA_PA_DIRECT_SOUND=1, //!< Windows DirectSound {
ITA_PA_MME=2, //!< Windows MME ITA_PA_DIRECT_SOUND = 1, //!< Windows DirectSound
ITA_PA_ASIO=3, //!< Windows Steinberg ASIO (recommended: use ITAsioInterface instead) ITA_PA_MME = 2, //!< Windows MME
ITA_PA_SOUND_MANAGER=4, //!< Macintosh Sound Manager ITA_PA_ASIO = 3, //!< Windows Steinberg ASIO (recommended: use ITAsioInterface instead)
ITA_PA_CORE_AUDIO=5, //!< MacOS CoreAudio ITA_PA_SOUND_MANAGER = 4, //!< Macintosh Sound Manager
ITA_PA_OSS=7, //!< Linux/Unix OSS ITA_PA_CORE_AUDIO = 5, //!< MacOS CoreAudio
ITA_PA_ALSA=8, //!< Linux/Unix ALSA ITA_PA_OSS = 7, //!< Linux/Unix OSS
ITA_PA_AL=9, //!< Silicon Graphics Irix using AL ITA_PA_ALSA = 8, //!< Linux/Unix ALSA
ITA_PA_BE_OS=10, //!< BeOS ITA_PA_AL = 9, //!< Silicon Graphics Irix using AL
ITA_PA_WDMKS=11, //!< Windows Driver Model Kernel Streaming driver ITA_PA_BE_OS = 10, //!< BeOS
ITA_PA_JACK=12, //!< MacOS/Linux/Unix Jack Audio ITA_PA_WDMKS = 11, //!< Windows Driver Model Kernel Streaming driver
ITA_PA_WASAPI=13, //!< Windows Audio Session API 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 ITA_PA_AUDIO_SCIENCE_HPI=14 //!< AudioScience Hardware Programming Interface
}; };
...@@ -185,7 +187,7 @@ public: ...@@ -185,7 +187,7 @@ public:
* *
* \see #Initialize #Initialize(const int iDriver) * \see #Initialize #Initialize(const int iDriver)
*/ */
ITAPortaudioInterface(const double dSampleRate, const int iBufferSize); ITAPortaudioInterface( double dSampleRate, int iBufferSize );
//! Destructor //! Destructor
~ITAPortaudioInterface(); ~ITAPortaudioInterface();
...@@ -201,25 +203,25 @@ public: ...@@ -201,25 +203,25 @@ public:
ITA_PA_ERRORCODE Initialize(); ITA_PA_ERRORCODE Initialize();
//! Initialize Portaudio using specified host/driver by id //! 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 //! 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 //! 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 //! Returns true if playback is enabled, false otherwise
bool IsPlaybackEnabled() const; bool IsPlaybackEnabled() const;
//! Set playback enabled/disabled //! Set playback enabled/disabled
void SetPlaybackEnabled(const bool bEnabled); void SetPlaybackEnabled( bool bEnabled);
//! Returns true if record is enabled, false otherwise //! Returns true if record is enabled, false otherwise
bool IsRecordEnabled() const; bool IsRecordEnabled() const;
//! Set record enabled/disabled //! Set record enabled/disabled
void SetRecordEnabled(const bool bEnabled); void SetRecordEnabled( bool bEnabled);
//! Finalize Portaudio //! Finalize Portaudio
/** /**
...@@ -243,7 +245,7 @@ public: ...@@ -243,7 +245,7 @@ public:
int GetNumDevices() const; int GetNumDevices() const;
//! Returns the name of the driver avaiable in Portaudio //! 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(); static int GetPreferredBufferSize();
...@@ -252,9 +254,9 @@ public: ...@@ -252,9 +254,9 @@ public:
* \param iDriverID Identifier of driver * \param iDriverID Identifier of driver
* \return Latency in seconds, -1 if any error with the driver occurs * \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 //! Returns the name of the current devices in Portaudio
std::string GetInputDeviceName() const; std::string GetInputDeviceName() const;
...@@ -275,31 +277,31 @@ public: ...@@ -275,31 +277,31 @@ public:
int GetOutputDevice() const; int GetOutputDevice() const;
//! Returns the number of input and output channels //! 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 //! Returns the number of input channels
/** /**
* \return Number of input channels (>=0) or #ITA_PA_ERRORCODE (<0) * \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 //! Returns the number of output channels
/** /**
* \return Number of output channels (>=0) or #ITA_PA_ERRORCODE (<0) * \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 //! Returns the sample rate
double GetSampleRate() const; double GetSampleRate() const;
//! Sets the sample rate //! Sets the sample rate
ITA_PA_ERRORCODE SetSampleRate(const double dSampleRate); ITA_PA_ERRORCODE SetSampleRate( double dSampleRate );
//! Set the playback data source //! Set the playback data source
/** /**
* \note Enables playback, see IsPlaybackEnabled() and SetPlaybackEnabled() * \note Enables playback, see IsPlaybackEnabled() and SetPlaybackEnabled()
*/ */
ITA_PA_ERRORCODE SetPlaybackDatasource(ITADatasource* pidsDatasource); ITA_PA_ERRORCODE SetPlaybackDatasource( ITADatasource* pidsDatasource );
//! Get the recording data source //! Get the recording data source
/** /**
...@@ -312,21 +314,23 @@ public: ...@@ -312,21 +314,23 @@ public:
ITADatasource* GetRecordDatasource(); ITADatasource* GetRecordDatasource();
//! Uses the Portaudio sleep function //! Uses the Portaudio sleep function
void Sleep(const float fSeconds) const; void Sleep( float fSeconds ) const;
//! Returns a human readable error code string //! 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 //! Internal user data class for information exchange with callback function
class ITAPortaudioUserData { class ITAPortaudioUserData
{
public: public:
ITADatasource* pdsPlaybackDatasource; //!< ITADatasource playback datasource ITADatasource* pdsPlaybackDatasource; //!< ITADatasource playback datasource
ITADatasource* pdsRecordDatasource; //!< ITADatasource record datasource ITADatasource* pdsRecordDatasource; //!< ITADatasource record datasource
bool bPlayback; //!< Playback enabled bool bPlayback; //!< Playback enabled
bool bRecord; //!< Record enabled bool bRecord; //!< Record enabled
ITAPortaudioUserData() { inline ITAPortaudioUserData()
{
pdsPlaybackDatasource = NULL; pdsPlaybackDatasource = NULL;
pdsRecordDatasource = NULL; pdsRecordDatasource = NULL;
bPlayback = false; bPlayback = false;
...@@ -335,7 +339,7 @@ public: ...@@ -335,7 +339,7 @@ public:
}; };
private: private:
//! Standard constructor //! Standard constructor deactivated
ITAPortaudioInterface(); ITAPortaudioInterface();
std::string m_sConfigFile; //!< Configuration file path std::string m_sConfigFile; //!< Configuration file path
...@@ -364,7 +368,6 @@ private: ...@@ -364,7 +368,6 @@ private:
ITA_PA_ERRORCODE m_iError; //!< Last ITAPortaudio error ITA_PA_ERRORCODE m_iError; //!< Last ITAPortaudio error
}; };
#endif // INCLUDE_WATCHER_ITA_PORTAUDIO_INTERFACE #endif // INCLUDE_WATCHER_ITA_PORTAUDIO_INTERFACE
...@@ -9,17 +9,18 @@ ...@@ -9,17 +9,18 @@
#include <ITAStreamInfo.h> #include <ITAStreamInfo.h>
// Portaudio Callback Function // 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: public:
ITAPortaudioSource(int iChannels, double dSamplerate, int iBufferSize) ITAPortaudioSource( int iChannels, double dSampleRate, int iBufferSize )
: ITADatasourceRealization((unsigned int) iChannels, dSamplerate, (unsigned int) iBufferSize, 16) {} : ITADatasourceRealization( ( unsigned int ) iChannels, dSampleRate, ( unsigned int ) iBufferSize, 16 ) {};
}; };
ITAPortaudioInterface::ITAPortaudioInterface(const double dSampleRate, const int iBufferSize) : ITAPortaudioInterface::ITAPortaudioInterface( double dSampleRate, int iBufferSize )
m_vpPaStream(NULL) : m_vpPaStream( NULL )
{ {
m_dSampleRate = dSampleRate; m_dSampleRate = dSampleRate;
m_iBufferSize = iBufferSize; // Darf 0 sein m_iBufferSize = iBufferSize; // Darf 0 sein
...@@ -41,13 +42,17 @@ ITAPortaudioInterface::ITAPortaudioInterface(const double dSampleRate, const int ...@@ -41,13 +42,17 @@ ITAPortaudioInterface::ITAPortaudioInterface(const double dSampleRate, const int
m_iError = ITA_PA_NO_ERROR; 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; 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) if (m_bInitialized)
return ITA_PA_IS_INITIALIZED; return ITA_PA_IS_INITIALIZED;
...@@ -79,7 +84,8 @@ ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Initialize(const ...@@ -79,7 +84,8 @@ ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Initialize(const
return ITA_PA_NO_ERROR; return ITA_PA_NO_ERROR;
} }
ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Initialize() { ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Initialize()
{
if (m_bInitialized) if (m_bInitialized)
return ITA_PA_IS_INITIALIZED; return ITA_PA_IS_INITIALIZED;
...@@ -108,11 +114,13 @@ ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Initialize() { ...@@ -108,11 +114,13 @@ ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Initialize() {
return ITA_PA_NO_ERROR; return ITA_PA_NO_ERROR;
} }
bool ITAPortaudioInterface::IsPlaybackEnabled() const { bool ITAPortaudioInterface::IsPlaybackEnabled() const
{
return m_bPlayback; return m_bPlayback;
} }
void ITAPortaudioInterface::SetPlaybackEnabled(const bool bEnabled) { void ITAPortaudioInterface::SetPlaybackEnabled( bool bEnabled )
{
m_bPlayback = bEnabled; m_bPlayback = bEnabled;
} }
...@@ -120,11 +128,13 @@ bool ITAPortaudioInterface::IsRecordEnabled() const { ...@@ -120,11 +128,13 @@ bool ITAPortaudioInterface::IsRecordEnabled() const {
return m_bRecord; return m_bRecord;
} }
void ITAPortaudioInterface::SetRecordEnabled(const bool bEnabled) { void ITAPortaudioInterface::SetRecordEnabled( bool bEnabled )
{
m_bRecord = bEnabled; m_bRecord = bEnabled;
} }
ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Finalize() { ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Finalize()
{
if (!m_bInitialized) if (!m_bInitialized)
return ITA_PA_NOT_INITIALIZED; return ITA_PA_NOT_INITIALIZED;
...@@ -147,7 +157,8 @@ ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Finalize() { ...@@ -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) if (!m_bInitialized)
return ITA_PA_NOT_INITIALIZED; return ITA_PA_NOT_INITIALIZED;
...@@ -201,17 +212,21 @@ ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Open() { ...@@ -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); 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_vpPaStream = (void*) stream;
m_bOpen = true; m_bOpen = true;
} else { }
else
{
m_vpPaStream = NULL; m_vpPaStream = NULL;
} }
return m_iError; return m_iError;
} }
ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Close() { ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Close()
{
if (!m_bInitialized) if (!m_bInitialized)
return ITA_PA_NOT_INITIALIZED; return ITA_PA_NOT_INITIALIZED;
...@@ -229,7 +244,8 @@ ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Close() { ...@@ -229,7 +244,8 @@ ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Close() {
return m_iError; return m_iError;
} }
ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Start() { ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Start()
{
if (m_bStreaming) if (m_bStreaming)
return ITA_PA_IS_STARTED; return ITA_PA_IS_STARTED;
...@@ -253,7 +269,8 @@ ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Start() { ...@@ -253,7 +269,8 @@ ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Start() {
return m_iError; return m_iError;
} }
ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Stop() { ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Stop()
{
if (!m_bStreaming) if (!m_bStreaming)
return ITA_PA_STREAM_IS_STOPPED; return ITA_PA_STREAM_IS_STOPPED;
...@@ -277,7 +294,8 @@ int ITAPortaudioInterface::GetNumDevices() const { ...@@ -277,7 +294,8 @@ int ITAPortaudioInterface::GetNumDevices() const {
} }
int ITAPortaudioInterface::GetNumInputChannels(const int iDeviceID) const { int ITAPortaudioInterface::GetNumInputChannels( int iDeviceID ) const
{
if (!m_bInitialized) if (!m_bInitialized)
return ITA_PA_NOT_INITIALIZED; return ITA_PA_NOT_INITIALIZED;
...@@ -287,7 +305,8 @@ int ITAPortaudioInterface::GetNumInputChannels(const int iDeviceID) const { ...@@ -287,7 +305,8 @@ int ITAPortaudioInterface::GetNumInputChannels(const int iDeviceID) const {
return info->maxInputChannels; return info->maxInputChannels;
} }
int ITAPortaudioInterface::GetNumOutputChannels(const int iDeviceID) const { int ITAPortaudioInterface::GetNumOutputChannels( int iDeviceID ) const
{
if (!m_bInitialized) if (!m_bInitialized)
return ITA_PA_NOT_INITIALIZED; return ITA_PA_NOT_INITIALIZED;
...@@ -297,16 +316,19 @@ int ITAPortaudioInterface::GetNumOutputChannels(const int iDeviceID) const { ...@@ -297,16 +316,19 @@ int ITAPortaudioInterface::GetNumOutputChannels(const int iDeviceID) const {
return info->maxOutputChannels; return info->maxOutputChannels;
} }
double ITAPortaudioInterface::GetSampleRate() const { double ITAPortaudioInterface::GetSampleRate() const
{
return m_dSampleRate; 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); iNumInputChannels = GetNumInputChannels(iDeviceID);
iNumOutputChannels = GetNumOutputChannels(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) if (!m_bInitialized)
return ITA_PA_NOT_INITIALIZED; return ITA_PA_NOT_INITIALIZED;
...@@ -318,7 +340,8 @@ ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::GetDriverSampleRa ...@@ -318,7 +340,8 @@ ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::GetDriverSampleRa
return ITA_PA_NO_ERROR; return ITA_PA_NO_ERROR;
} }
std::string ITAPortaudioInterface::GetDeviceName(const int iDriverID) const { std::string ITAPortaudioInterface::GetDeviceName( int iDriverID ) const
{
if (!m_bInitialized)