/* Copyright (C) 2014 Waves Audio Ltd. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ //---------------------------------------------------------------------------------- // // //! \file WCMRPortAudioDeviceManager.h //! //! WCMRPortAudioDeviceManager and related class declarations //! //---------------------------------------------------------------------------------*/ #ifndef __WCMRPortAudioDeviceManager_h_ #define __WCMRPortAudioDeviceManager_h_ #include "WCMRAudioDeviceManager.h" #include "WCMRNativeAudio.h" #include "portaudio.h" //forward decl. class WCMRPortAudioDeviceManager; //! Manages a port audio device, providing information //! about the device, and managing audio callbacks. class WCMRPortAudioDevice : public WCMRNativeAudioDevice { public: WCMRPortAudioDevice (WCMRPortAudioDeviceManager *pManager, unsigned int deviceID, bool useMultiThreading = true, bool bNoCopy = false);///& buffers) const; virtual WTErr getDeviceSampleRatesImpl(const std::string & deviceName, std::vector& sampleRates) const; bool m_UseMultithreading; ///< Flag indicates whether to use multi-threading for audio processing. bool m_bNoCopyAudioBuffer; private: // helper functions for this class only WTErr getDeviceAvailableSampleRates(DeviceID deviceId, std::vector& sampleRates); WTErr getDeviceAvailableBufferSizes(DeviceID deviceId, std::vector& buffers); WCMRAudioDevice* m_NoneDevice; }; #endif //#ifndef __WCMRPortAudioDeviceManager_h_