/** @file * @author Edouard DUPIN * @copyright 2011, Edouard DUPIN, all right reserved * @license APACHE v2.0 (see license file) * @fork from RTAudio */ #if !defined(__AUDIO_ORCHESTRA_API_DS_H__) && defined(ORCHESTRA_BUILD_DS) #define __AUDIO_ORCHESTRA_API_DS_H__ namespace audio { namespace orchestra { namespace api { class DsPrivate; class Ds: public audio::orchestra::Api { public: static audio::orchestra::Api* Create(); public: Ds(); virtual ~Ds(); enum audio::orchestra::type getCurrentApi() { return audio::orchestra::type_ds; } uint32_t getDeviceCount(); uint32_t getDefaultOutputDevice(); uint32_t getDefaultInputDevice(); audio::orchestra::DeviceInfo getDeviceInfo(uint32_t _device); enum audio::orchestra::error closeStream(); enum audio::orchestra::error startStream(); enum audio::orchestra::error stopStream(); enum audio::orchestra::error abortStream(); long getStreamLatency(); // This function is intended for internal use only. It must be // public because it is called by the internal callback handler, // which is not a member of RtAudio. External use of this function // will most likely produce highly undesireable results! void callbackEvent(); private: static void dsCallbackEvent(void *_userData); std11::shared_ptr m_private; bool m_coInitialized; bool m_buffersRolling; long m_duplexPrerollBytes; bool probeDeviceOpen(uint32_t _device, enum audio::orchestra::mode _mode, uint32_t _channels, uint32_t _firstChannel, uint32_t _sampleRate, enum audio::format _format, uint32_t *_bufferSize, const audio::orchestra::StreamOptions& _options); }; } } } #endif