neutrino: add more RC_playpause handling

Origin commit data
------------------
Branch: ni/coolstream
Commit: 764b25542f
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-12-19 (Tue, 19 Dec 2017)

Origin message was:
------------------
- neutrino: add more RC_playpause handling

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2017-12-19 10:58:44 +01:00
parent 7dbb4d3d0b
commit 938b53bb4b
9 changed files with 62 additions and 30 deletions

View File

@@ -592,29 +592,40 @@ int CPictureViewerGui::show()
// FIXME: do not accept volume-keys while decoding
}
// control keys for audioplayer
else if (audioplayer && msg==CRCInput::RC_pause)
else if (audioplayer)
{
m_currentTitle = m_audioPlayer->getAudioPlayerM_current();
m_audioPlayer->pause();
}
else if (audioplayer && msg==CRCInput::RC_stop)
{
m_currentTitle = m_audioPlayer->getAudioPlayerM_current();
m_audioPlayer->stop();
}
else if (audioplayer && msg==CRCInput::RC_play)
{
m_currentTitle = m_audioPlayer->getAudioPlayerM_current();
if (m_currentTitle > -1)
m_audioPlayer->play((unsigned int)m_currentTitle);
}
else if (audioplayer && msg==CRCInput::RC_forward)
{
m_audioPlayer->playNext();
}
else if (audioplayer && msg==CRCInput::RC_rewind)
{
m_audioPlayer->playPrev();
if (msg == CRCInput::RC_playpause)
{
// manipulate msg
if (m_audioPlayer->getState() == CAudioPlayerGui::PAUSE)
msg = CRCInput::RC_play;
else
msg = CRCInput::RC_pause;
}
if (msg == CRCInput::RC_play)
{
if (m_currentTitle > -1)
m_audioPlayer->play((unsigned int)m_currentTitle);
}
else if (msg == CRCInput::RC_pause)
{
m_audioPlayer->pause();
}
else if (msg == CRCInput::RC_stop)
{
m_audioPlayer->stop();
}
else if (msg == CRCInput::RC_forward || msg == CRCInput::RC_nextsong)
{
m_audioPlayer->playNext();
}
else if (msg == CRCInput::RC_rewind || msg == CRCInput::RC_previoussong)
{
m_audioPlayer->playPrev();
}
}
else if (msg == NeutrinoMessages::CHANGEMODE)
{