add correct copyright statements to all files in Waves backend except those derived...
[ardour.git] / libs / backends / wavesaudio / wavesapi / devicemanager / WCMRCoreAudioDeviceManager.h
index 5cfbedb9c9a7c0ec79d91814748e4407c50f3df6..74d1d18dfd6afbc9eecc5dd10292f535b335f806 100644 (file)
@@ -1,6 +1,24 @@
+/*
+    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.
+
+*/
+
 //----------------------------------------------------------------------------------
 //
-// Copyright (c) 2008 Waves Audio Ltd. All rights reserved.
 //
 //! \file      WCMRCoreAudioDeviceManager.h
 //!
@@ -81,7 +99,7 @@ protected:
 
        AudioDeviceID m_DeviceID; ///< The CoreAudio device id
        bool m_StopRequested; ///< should be set to true when want to stop, set to false otherwise.
-       float *m_pInputData; ///< This is what came in with the most recent callback.
+    float *m_pInputData; ///< This is what came in with the most recent callback.
        int m_SampleCounter; ///< The current running sample counter, updated by the audio callback.
        int m_SampleCountAtLastIdle; ///< What was the sample count last time we checked...
        int m_StalledSampleCounter; ///< The number of idle calls with same sample count detected
@@ -93,9 +111,7 @@ protected:
 //     int m_CyclesToAccumulate; ///< The number of cycles to accumulate the values for - maximum for last one second.
 //     unsigned int m_CyclePeriod; ///< The number of host time units for a cycle period - determined by buffer size and sampling rate
        
-       
-       
-       AudioBufferList m_InputAudioBufferList; ///< The buffer list used to get AHHAL to render input to.
+
        AudioUnit m_AUHALAudioUnit;///< The AUHAL AudioUnit
 
        int m_BufferSizeChangeRequested;
@@ -152,6 +168,7 @@ protected:
        AudioDevicePropertyID inPropertyID, void *inClientData);
        void PropertyChangeProc (AudioDevicePropertyID inPropertyID);
     
+    void resetAudioDevice();
 private:
 
 };
@@ -168,12 +185,13 @@ public:
        virtual ~WCMRCoreAudioDeviceManager(void); ///< Destructor
 
 protected:
-    static OSStatus DevicePropertyChangeCallback (AudioHardwarePropertyID inPropertyID, void* inClientData);
+    static OSStatus HardwarePropertyChangeCallback (AudioHardwarePropertyID inPropertyID, void* inClientData);
     
     virtual WCMRAudioDevice*   initNewCurrentDeviceImpl(const std::string & deviceName);
        virtual void                            destroyCurrentDeviceImpl();
        virtual WTErr                           generateDeviceListImpl();
     virtual WTErr                              updateDeviceListImpl();
+    virtual WTErr               getDeviceSampleRatesImpl(const std::string & deviceName, std::vector<int>& sampleRates) const;
        virtual WTErr                           getDeviceBufferSizesImpl(const std::string & deviceName, std::vector<int>& bufferSizes) const;
     
        bool m_UseMultithreading; ///< Flag indicates whether to use multi-threading for audio processing.