From 7b0316a8aa0f99d5263cacab48574798c6a345ff Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Sun, 14 Jun 2015 18:32:08 +0200 Subject: [PATCH] [DEV] rework continue (better integration of pulseaudio and low level devices --- audio/orchestra/DeviceInfo.cpp | 24 +- audio/orchestra/DeviceInfo.h | 25 +- audio/orchestra/Interface.cpp | 52 +- audio/orchestra/Interface.h | 66 +-- audio/orchestra/api/Alsa.cpp | 152 ++---- audio/orchestra/api/Alsa.h | 4 +- audio/orchestra/api/Ds.cpp | 607 +++++++++++------------- audio/orchestra/api/Ds.h | 2 - audio/orchestra/api/Jack.cpp | 73 ++- audio/orchestra/api/Pulse.cpp | 25 +- audio/orchestra/api/PulseDeviceList.cpp | 262 ++++++++-- audio/orchestra/api/PulseDeviceList.h | 30 +- 12 files changed, 666 insertions(+), 656 deletions(-) diff --git a/audio/orchestra/DeviceInfo.cpp b/audio/orchestra/DeviceInfo.cpp index 9cc645e..ca58a14 100644 --- a/audio/orchestra/DeviceInfo.cpp +++ b/audio/orchestra/DeviceInfo.cpp @@ -19,26 +19,22 @@ void audio::orchestra::DeviceInfo::display(int32_t _tabNumber) const { for (int32_t iii=0; iii<_tabNumber; ++iii) { space += " "; } - ATA_PRINT(space + "probe=" << probed); + ATA_PRINT(space + "mode=" << (input==true?"input":"output")); ATA_PRINT(space + "name=" << name); - ATA_PRINT(space + "outputChannels=" << outputChannels); - ATA_PRINT(space + "inputChannels=" << inputChannels); - ATA_PRINT(space + "duplexChannels=" << duplexChannels); - ATA_PRINT(space + "isDefaultOutput=" << (isDefaultOutput==true?"true":"false")); - ATA_PRINT(space + "isDefaultInput=" << (isDefaultInput==true?"true":"false")); - ATA_PRINT(space + "rates=" << sampleRates); - ATA_PRINT(space + "native Format: " << nativeFormats); + ATA_PRINT(space + "desc=" << desc); + ATA_PRINT(space + "channel" << (channels.size()>1?"s":"") << "=" << channels.size() << " : " << channels); + ATA_PRINT(space + "rate" << (sampleRates.size()>1?"s":"") << "=" << sampleRates); + ATA_PRINT(space + "native Format" << (nativeFormats.size()>1?"s":"") << ": " << nativeFormats); + ATA_PRINT(space + "default=" << (isDefault==true?"true":"false")); } + std::ostream& audio::orchestra::operator <<(std::ostream& _os, const audio::orchestra::DeviceInfo& _obj) { _os << "{"; - _os << "probe=" << _obj.probed << ", "; _os << "name=" << _obj.name << ", "; - _os << "outputChannels=" << _obj.outputChannels << ", "; - _os << "inputChannels=" << _obj.inputChannels << ", "; - _os << "duplexChannels=" << _obj.duplexChannels << ", "; - _os << "isDefaultOutput=" << _obj.isDefaultOutput << ", "; - _os << "isDefaultInput=" << _obj.isDefaultInput << ", "; + _os << "description=" << _obj.desc << ", "; + _os << "channels=" << _obj.channels << ", "; + _os << "default=" << _obj.isDefault << ", "; _os << "rates=" << _obj.sampleRates << ", "; _os << "native Format: " << _obj.nativeFormats; _os << "}"; diff --git a/audio/orchestra/DeviceInfo.h b/audio/orchestra/DeviceInfo.h index 8b0d9ba..ec8875d 100644 --- a/audio/orchestra/DeviceInfo.h +++ b/audio/orchestra/DeviceInfo.h @@ -9,6 +9,7 @@ #define __AUDIO_ORCHESTRA_DEVICE_INFO_H__ #include