That reminds me of BeOS's system function IsComputerOn ("returns 1.0 if computer is on, unspecified otherwise") - well defined, yet useless. I wonder what its creators were thinking (esp. since systems sans audio capabilities exist, now more than ever).
–
PiskvorDec 22 '10 at 16:40

@Piskvor: IsComputerOn? LOL... @Mattias: good catch. the short description seems clear ("[static] [read-only] Specifies whether the system has audio capabilities.") until, as you've pointed out, "This property is always true". i assume that devices/computers without sound will return false, that the description is written in error, otherwise the property is totally useless.
–
TheDarkIn1978Dec 22 '10 at 16:51

AFAIK, it always returns true for the desktop players, but may or may not do so for players on other devices. The docs are clear as mud on this.
–
mackeDec 22 '10 at 16:55

2 Answers
2

The docs are unclear on this, but I think that the properties in the Capabilities class tells you what the capabilities of the player is, not necessarily the system. For instance, the desktop players will always return true for hasAudio, regardless of whether the system actually can play audio or not.

Unfortunately, I don't think there's any way of determining the audio capabilities of the actual system. If you disable your sound card for instance, hasAudio will still return true AFAIK.

Well, I'm not sure, but I think that some players on other platforms (Solaris comes to mind) might not support sound. However, I think that this API might well be something that falls in the "seemed right at the time" category. There are a few of those in the platform.
–
mackeDec 22 '10 at 19:46

It is important to understand that the hasAudio and hasMP3 property settings are based on the capabilities of the Player and not of the system on which the Player is running. The desktop system players "(for Windows, Mac OS, and Linux) always return true for both properties regardless of whether or not the system actually has the hardware (i.e., soundcard and speakers) to play back sounds. However, players for other devices may return false if the device does not support the audio or MP3 features."
–
mackeDec 22 '10 at 19:56