04-15-2024, 11:30 AM
For the renderers there is no API (at least as far as I know of) for getting the stream info so it's just hard coded. The exception is Multiroom sender where I know for sure from the TRX source code its 16/48K Opus to PCM. I suppose I could also browse through the renderer sources but I'll leave that for another day.
Code:
//
// INPUT
//
if ($btActive === true && $_SESSION['audioout'] == 'Local') {
$_file = 'Bluetooth stream';
$_encoded_at = 'Unknown';
$_decoded_to = 'PCM 16 bit 44.1 kHz, Stereo';
$_decode_rate = '';
} else if ($aplActive == '1') {
$_file = 'AirPlay stream';
$_encoded_at = 'PCM';
$_decoded_to = 'PCM 16 bit 44.1 kHz, Stereo';
$_decode_rate = '';
} else if ($spotActive == '1') {
$_file = 'Spotify stream';
$_encoded_at = 'PCM';
$_decoded_to = 'PCM 16 bit 44.1 kHz, Stereo';
$_decode_rate = '';
} else if ($slActive == '1') {
$_file = 'Squeezelite stream';
$_encoded_at = 'Unknown';
$_decoded_to = 'Unknown';
$_decode_rate = '';
} else if ($rbActive == '1') {
$_file = 'RoonBridge stream';
$_encoded_at = 'Unknown';
$_decoded_to = 'Unknown';
$_decode_rate = '';
} else if ($_SESSION['multiroom_rx'] == 'On') {
$_file = 'Multiroom sender stream';
$_encoded_at = 'Opus 16 bit 48 kHz, Stereo';
$_decoded_to = 'PCM 16 bit 48 kHz, Stereo';
$_decode_rate = '';
} else {
$song = getCurrentSong($sock);
$_file = $song['file'];
.
.
.