diff options
author | Memphiz <memphis@machzwo.de> | 2014-07-01 20:48:33 +0200 |
---|---|---|
committer | Memphiz <memphis@machzwo.de> | 2014-08-03 21:29:58 +0200 |
commit | 3cf85c8e209ef786ae6a67fd6528479f3aa636fe (patch) | |
tree | 3e7ce0d7f6c73e62e48505575a7f005bb6cf8c83 | |
parent | 25483e360beaf4ad097fa425ff496d509df879e6 (diff) |
[AE/osxsink] - for the extra display name use the audiosource name or the channel numbers for multistream devices
-rw-r--r-- | xbmc/cores/AudioEngine/Sinks/osx/AEDeviceEnumerationOSX.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/xbmc/cores/AudioEngine/Sinks/osx/AEDeviceEnumerationOSX.cpp b/xbmc/cores/AudioEngine/Sinks/osx/AEDeviceEnumerationOSX.cpp index 93e98b6625..613ad0238e 100644 --- a/xbmc/cores/AudioEngine/Sinks/osx/AEDeviceEnumerationOSX.cpp +++ b/xbmc/cores/AudioEngine/Sinks/osx/AEDeviceEnumerationOSX.cpp @@ -381,20 +381,28 @@ std::string AEDeviceEnumerationOSX::getDeviceNameForStream(UInt32 streamIdx) con } std::string AEDeviceEnumerationOSX::getExtraDisplayNameForStream(UInt32 streamIdx) const -{ - std::string extraDisplayName = ""; - +{ // for distinguishing the streams inside one device we add - // Stream <number> to the extraDisplayName + // the corresponding channels to the extraDisplayName // planar devices are ignored here as their streams are // the channels not different subdevices if (m_caStreamInfos.size() > 1 && !m_isPlanar) { - std::stringstream streamIdxStr; - streamIdxStr << streamIdx; - extraDisplayName = "Stream " + streamIdxStr.str(); + // build a string with the channels for this stream + UInt32 startChannel = 0; + CCoreAudioStream::GetStartingChannelInDevice(m_caStreamInfos[streamIdx].streamID, startChannel); + UInt32 numChannels = m_caDevice.GetNumChannelsOfStream(streamIdx); + std::stringstream extraName; + extraName << "Channels "; + extraName << startChannel; + extraName << " - "; + extraName << startChannel + numChannels - 1; + CLog::Log(LOGNOTICE, "%s adding stream %d as pseudo device with start channel %d and %d channels total", __FUNCTION__, (unsigned int)streamIdx, (unsigned int)startChannel, (unsigned int)numChannels); + return extraName.str(); } - return extraDisplayName; + + //for all other devices use the datasource as extraname + return m_caDevice.GetCurrentDataSourceName(); } float AEDeviceEnumerationOSX::scoreSampleRate(Float64 destinationRate, unsigned int sourceRate) const |