API updates
This commit is contained in:
parent
d356989d5e
commit
018f3c97a8
2 changed files with 15 additions and 15 deletions
|
@ -20,7 +20,7 @@ XMMSHandler::XMMSHandler (MainWindow *mw) : sigc::trackable ()
|
|||
}
|
||||
m_qt4 = new XmmsQT4 (m_xmmsc->getConn (), qApp);
|
||||
|
||||
XMMSResult *r = m_xmmsc->signal_playback_playtime ();
|
||||
XMMSResultValueUint *r = m_xmmsc->signal_playback_playtime ();
|
||||
r->connect (sigc::mem_fun (this, &XMMSHandler::playback_playtime));
|
||||
|
||||
r = m_xmmsc->broadcast_playback_current_id ();
|
||||
|
@ -31,7 +31,7 @@ XMMSHandler::XMMSHandler (MainWindow *mw) : sigc::trackable ()
|
|||
}
|
||||
|
||||
void
|
||||
XMMSHandler::playback_status (XMMSResult *res)
|
||||
XMMSHandler::playback_status (XMMSResultValueUint *res)
|
||||
{
|
||||
uint i;
|
||||
res->getValue (&i);
|
||||
|
@ -48,10 +48,10 @@ XMMSHandler::playback_status (XMMSResult *res)
|
|||
}
|
||||
|
||||
void
|
||||
XMMSHandler::playback_playtime (XMMSResult *res)
|
||||
XMMSHandler::playback_playtime (XMMSResultValueUint *res)
|
||||
{
|
||||
uint i, sec, min;
|
||||
res->getValue (&i);
|
||||
res->getValue (&i);
|
||||
|
||||
sec = (i / 1000) % 60;
|
||||
min = (i / 1000) / 60;
|
||||
|
@ -71,14 +71,14 @@ XMMSHandler::playback_playtime (XMMSResult *res)
|
|||
}
|
||||
|
||||
void
|
||||
XMMSHandler::playback_current_id (XMMSResult *res)
|
||||
XMMSHandler::playback_current_id (XMMSResultValueUint *res)
|
||||
{
|
||||
uint i;
|
||||
res->getValue (&i);
|
||||
|
||||
qDebug ("current id = %d", i);
|
||||
|
||||
XMMSResult *r = m_xmmsc->medialib_get_info (i);
|
||||
XMMSResultDict *r = m_xmmsc->medialib_get_info (i);
|
||||
r->connect (sigc::mem_fun (this, &XMMSHandler::medialib_info));
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,7 @@ XMMSHandler::setPlaytime (void)
|
|||
}
|
||||
|
||||
void
|
||||
XMMSHandler::medialib_info (XMMSResult *res)
|
||||
XMMSHandler::medialib_info (XMMSResultDict *res)
|
||||
{
|
||||
char str[4096];
|
||||
int b;
|
||||
|
@ -102,15 +102,15 @@ XMMSHandler::medialib_info (XMMSResult *res)
|
|||
m_mw->getMD ()->m_text->setText (QString::fromUtf8 (str));
|
||||
m_mw->getSD ()->m_title->setText (QString::fromUtf8 (str));
|
||||
|
||||
if (res->getDictValue ("bitrate", &b)) {
|
||||
if (res->getValue ("bitrate", &b)) {
|
||||
m_mw->getMD ()->m_kbps->setNumber (b/1000, 3);
|
||||
}
|
||||
|
||||
if (res->getDictValue ("samplerate", &b)) {
|
||||
if (res->getValue ("samplerate", &b)) {
|
||||
m_mw->getMD ()->m_khz->setNumber (b/1000, 2);
|
||||
}
|
||||
|
||||
if (res->getDictValue ("channels:out", &b)) {
|
||||
if (res->getValue ("channels:out", &b)) {
|
||||
if (b == 1) {
|
||||
m_mw->getMD ()->m_stereo->setStereoMono (0, 1);
|
||||
} else {
|
||||
|
@ -118,7 +118,7 @@ XMMSHandler::medialib_info (XMMSResult *res)
|
|||
}
|
||||
}
|
||||
|
||||
if (res->getDictValue ("duration", &b)) {
|
||||
if (res->getValue ("duration", &b)) {
|
||||
if (b > 0) {
|
||||
m_mw->getMD ()->m_slider->setMax (b);
|
||||
m_mw->getMD ()->m_slider->hideBar (false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue