|
a/src/mpdcli.cxx |
|
b/src/mpdcli.cxx |
|
... |
|
... |
278 |
mpd_status_get_audio_format(mpds);
|
278 |
mpd_status_get_audio_format(mpds);
|
279 |
if (maf) {
|
279 |
if (maf) {
|
280 |
m_stat.bitdepth = maf->bits;
|
280 |
m_stat.bitdepth = maf->bits;
|
281 |
m_stat.sample_rate = maf->sample_rate;
|
281 |
m_stat.sample_rate = maf->sample_rate;
|
282 |
m_stat.channels = maf->channels;
|
282 |
m_stat.channels = maf->channels;
|
|
|
283 |
// For radios, we don't get the didl resource info from the
|
|
|
284 |
// media server, so fill in the details from mpd data if we
|
|
|
285 |
// can.
|
|
|
286 |
m_stat.currentsong.samplefreq = m_stat.sample_rate;
|
|
|
287 |
m_stat.currentsong.bitrate = m_stat.kbrate * 1000;
|
|
|
288 |
m_stat.currentsong.channels = m_stat.channels;
|
|
|
289 |
|
|
|
290 |
LOGDEB("MPD AUDIO FORMAT: " << int(maf->sample_rate) << " samps/S " <<
|
|
|
291 |
m_stat.kbrate << " kbits/S " << int(maf->bits) << " bits " <<
|
|
|
292 |
int(maf->channels) << " channels\n");
|
283 |
} else {
|
293 |
} else {
|
284 |
m_stat.bitdepth = m_stat.channels = m_stat.sample_rate = 0;
|
294 |
m_stat.bitdepth = m_stat.channels = m_stat.sample_rate = 0;
|
285 |
}
|
295 |
}
|
286 |
|
296 |
|
287 |
const char *err = mpd_status_get_error(mpds);
|
297 |
const char *err = mpd_status_get_error(mpds);
|