Skip to content

[AE][GUI] Add Audio category to System Information GUI window and popula... #1045

Closed
wants to merge 1 commit into from

7 participants

@DDDamian
DDDamian commented Jun 4, 2012

...te with current AudioEngine audio device capabilities enumeration results.

This PR aims to present the capabilites of the currently selected audio device in the System Information GUI window as we currently do with other hardware info.

This is the result of the code on my machine with an HDMI device selected: http://i45.tinypic.com/2n8wgnq.jpg

The data is derived from the sinks EnumerateDevicesEx() method.

As written, it calls the loaded engine and thus requires similar methods to be added for CA. It would be great if Gimli, Davilla or Memphiz could comment on whether useful information can also be returned from CA. If not we can make it specific to SoftAE/Linux/Windows.

There is limited space available in the window - as shown and written there is just enough room to describe the current passthrough device. If the window were scrollable we could add the current PCM/analog device info a well. Perhaps Jezz_X can comment on that possibility.

The goal is to provide the user with enough user-friendly info on their device(s) capabilities.

@DDDamian DDDamian [AE][GUI] Add Audio category to System Information GUI window and pop…
…ulate with current AudioEngine audio device capabilities enumeration results.
9b5ede7
@huceke
huceke commented Jun 4, 2012

I think you should extend AE and check if the extended enumeration is available from the slected engine and or audio sink. Based on the check display the information or not. Lets take platforms where we don't have AE and the dummy NULL audio sink is used.

@DDDamian
DDDamian commented Jun 4, 2012

Excellent suggestion - will incorporate check for NULL sink or lack of extended info.

@Memphiz

is allways true - is there a compare operator missing?

True if either of these devices changed since last check - forces report info refresh.

@pieh pieh commented on the diff Jun 4, 2012
xbmc/windows/GUIWindowSystemInfo.cpp
@@ -138,6 +139,26 @@ void CGUIWindowSystemInfo::FrameMove()
#endif
SetControlLabel(i++, "%s %s", 22010, SYSTEM_GPU_TEMPERATURE);
}
+ else if (m_section == CONTROL_BT_AUDIO)
+ {
@pieh
Team Kodi member
pieh added a note Jun 4, 2012

missing heading update:

SET_CONTROL_LABEL(40,g_localizeStrings.Get(_audio_info_string_id_));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@pieh pieh commented on the diff Jun 4, 2012
xbmc/windows/GUIWindowSystemInfo.cpp
@@ -138,6 +139,26 @@ void CGUIWindowSystemInfo::FrameMove()
#endif
SetControlLabel(i++, "%s %s", 22010, SYSTEM_GPU_TEMPERATURE);
}
+ else if (m_section == CONTROL_BT_AUDIO)
+ {
+ AEDeviceReport* pDeviceReport = g_infoManager.GetAudioDeviceReport();
+ SET_CONTROL_LABEL(i++, (CStdString)pDeviceReport->m_drDevice);
+ SET_CONTROL_LABEL(i++, (CStdString)pDeviceReport->m_drDevType);
+ SET_CONTROL_LABEL(i++, (CStdString)pDeviceReport->m_drChannels);
+ SET_CONTROL_LABEL(i++, (CStdString)pDeviceReport->m_drSampleRates);
+ if ((CStdString)pDeviceReport->m_drAC3ok != "")
@pieh
Team Kodi member
pieh added a note Jun 4, 2012

maybe just?

if (!pDeviceReport->m_drAC3ok.empty())

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@pieh pieh commented on the diff Jun 4, 2012
xbmc/windows/GUIWindowSystemInfo.cpp
@@ -34,7 +34,8 @@
#define CONTROL_BT_DEFAULT 95
#define CONTROL_BT_NETWORK 96
#define CONTROL_BT_VIDEO 97
-#define CONTROL_BT_HARDWARE 98
+#define CONTROL_BT_AUDIO 98
+#define CONTROL_BT_HARDWARE 99
@pieh
Team Kodi member
pieh added a note Jun 4, 2012

other way around please - make CONTROL_BT_AUDIO 99 and update CONTROL_END define and control ids in .xml

reason for that is that this will desync skins (button will say Hardware but it will show Audio), while doing other way will just not display audio info but rest would be fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@pieh
Team Kodi member
pieh commented Jun 4, 2012

In SystemInfo window we defined that there are 10 labels (ids 2 to 11) that we can set text on (http://wiki.xbmc.org/index.php?title=XBMC_Skinning_Manual#SettingsSystemInfo.xml). It's up to skin to display them properly (making all 10 visible at once or allow scrolling).

In "worst" case scenario You already have 10 labels filled and there is simply no room for PCM/Analog - we would need to bump label limit or change the way we display info (f.e. switch 10 labels to single (auto)scrollable textbox). Or maybe just join format lines to single line: "Supported formats: xxx, yyy, zzz" and avoid hitting that problem :).

@jmarshallnz, @JezzX, @ronie
By adding Audio tab we force skinners to update their skins anyway so nothing stops us from doing something more here. Single TextBox (with backward-compat for 10 labels ofcourse) seems like easiest solution here. What do You think?

@DDDamian
DDDamian commented Jun 4, 2012

@pieh - thanks! Exactly what I'm hoping for there - just don't have the GUI experience. Appreciate the insight as the pre-defined 10 labels don't allow the level of information required to show both Passthrough and PCM devices.

Joining the formats is one option (and I'd like to add a 16-bit, 24bit or float tag too) but will still be tight for two devices, passthrough and analog.

@jmarshallnz

This all needs to be localisable?

@jmarshallnz

an array of bools?

Will convert to bools for efficiency.

@jmarshallnz

Why not direct from AE rather than via the infomanager?

More just to follow the centralized depository created by the info manager - certainly reduces redirects to pull straight from AE.

@jmarshallnz
Team Kodi member

@pieh: A textbox seems to be the most reasonable for this stuff, yes.

@DDDamian: Perhaps the DTS Ok stuff could be more easily represented by a "formats supported" or some such with a list of items following it?

@JezzX
Team Kodi member
JezzX commented Jun 4, 2012

@pieh if you go to the team forum I have a concept on how to allow more rich stuff than a straight textbox would allow by basically mimicking how settings category work. which would allow things like progress bars for cpu usage and memory and hdd usage But no none seems to be interested in doing the work

@jmarshallnz I agree with the "Supported formats: DTS, PCM, Dolby HD" might look nicer

@DDDamian
DDDamian commented Jun 4, 2012

Thx all for the comments - agree with all - just hoping now to hear from our OSX friends on what's possible here or if I should restrict to SoftAE for now. I have no idea how to change the labels over to a textbox, so any guidance from Grajen/Jezz_X would be great.

@DDDamian
DDDamian commented Jun 4, 2012

@jmarshallnz - the list of supported formats can get quite long, now and in future - see device 3 from my log http://pastebin.com/raw.php?i=gQZpytFe. Technically my device supports DSD or single-bit audio as well, which is not shown but certainly requested for support and SACD playback is something I'd very much like to add to XBMC.

Would like to show the important ones (encoded formats, multchannel LPCM, and perhaps whether max format is Float, 32bit, 24bit or 16 bit)

@MartijnKaijser
Team Kodi member

This will be taken care off with settings rework

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.