vfd/audioplayer: fix vfd progress in audioplayer

don't update full vfd every second


Origin commit data
------------------
Branch: ni/coolstream
Commit: 90f968c19d
Author: vanhofen <vanhofen@gmx.de>
Date: 2015-01-09 (Fri, 09 Jan 2015)

Origin message was:
------------------
- vfd/audioplayer: fix vfd progress in audioplayer

 don't update full vfd every second


------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2015-01-09 11:18:52 +01:00
parent d315193cc4
commit 4b98762d92
3 changed files with 15 additions and 28 deletions

View File

@@ -837,7 +837,7 @@ int CAudioPlayerGui::show()
ret = menu_return::RETURN_EXIT_ALL;
loop = false;
}
paintLCD();
//paintLCD();
}
}
hide();
@@ -2162,9 +2162,9 @@ void CAudioPlayerGui::updateTimes(const bool force)
}
}
}
if ((updatePlayed || updateTotal) && m_time_total != 0)
if ((updatePlayed || updateTotal) && m_curr_audiofile.FileType != CFile::STREAM_AUDIO && m_time_total != 0)
{
CVFD::getInstance()->showAudioProgress(100 * m_time_played / m_time_total, CNeutrinoApp::getInstance()->isMuted());
CVFD::getInstance()->showAudioProgress(100 * m_time_played / m_time_total);
}
}
}
@@ -2175,20 +2175,14 @@ void CAudioPlayerGui::paintLCD()
{
case CAudioPlayerGui::STOP:
CVFD::getInstance()->showAudioPlayMode(CVFD::AUDIO_MODE_STOP);
CVFD::getInstance()->showAudioProgress(0, CNeutrinoApp::getInstance()->isMuted());
CVFD::getInstance()->showAudioProgress(0);
break;
case CAudioPlayerGui::PLAY:
CVFD::getInstance()->showAudioPlayMode(CVFD::AUDIO_MODE_PLAY);
CVFD::getInstance()->showAudioTrack(m_curr_audiofile.MetaData.artist, m_curr_audiofile.MetaData.title,
m_curr_audiofile.MetaData.album);
if (m_curr_audiofile.FileType != CFile::STREAM_AUDIO && m_time_total != 0)
CVFD::getInstance()->showAudioProgress(100 * m_time_played / m_time_total, CNeutrinoApp::getInstance()->isMuted());
#ifdef INCLUDE_UNUSED_STUFF
else
CVFD::getInstance()->showAudioProgress(100 * CAudioPlayer::getInstance()->getScBuffered() / 65536, CNeutrinoApp::getInstance()->isMuted());
#endif /* INCLUDE_UNUSED_STUFF */
CVFD::getInstance()->showAudioProgress(100 * m_time_played / m_time_total);
break;
case CAudioPlayerGui::PAUSE:
CVFD::getInstance()->showAudioPlayMode(CVFD::AUDIO_MODE_PAUSE);