mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
gui/audioplayer.cpp/h: fix some type conversions
This commit is contained in:
@@ -2166,7 +2166,7 @@ void CAudioPlayerGui::updateTimes(const bool force)
|
|||||||
}
|
}
|
||||||
if ((updatePlayed || updateTotal) && m_curr_audiofile.FileType != CFile::STREAM_AUDIO && 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);
|
CVFD::getInstance()->showAudioProgress(uint8_t(100 * m_time_played / m_time_total));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2184,7 +2184,7 @@ void CAudioPlayerGui::paintLCD()
|
|||||||
CVFD::getInstance()->showAudioTrack(m_curr_audiofile.MetaData.artist, m_curr_audiofile.MetaData.title,
|
CVFD::getInstance()->showAudioTrack(m_curr_audiofile.MetaData.artist, m_curr_audiofile.MetaData.title,
|
||||||
m_curr_audiofile.MetaData.album);
|
m_curr_audiofile.MetaData.album);
|
||||||
if (m_curr_audiofile.FileType != CFile::STREAM_AUDIO && m_time_total != 0)
|
if (m_curr_audiofile.FileType != CFile::STREAM_AUDIO && m_time_total != 0)
|
||||||
CVFD::getInstance()->showAudioProgress(100 * m_time_played / m_time_total);
|
CVFD::getInstance()->showAudioProgress(uint8_t(100 * m_time_played / m_time_total));
|
||||||
break;
|
break;
|
||||||
case CAudioPlayerGui::PAUSE:
|
case CAudioPlayerGui::PAUSE:
|
||||||
CVFD::getInstance()->showAudioPlayMode(CVFD::AUDIO_MODE_PAUSE);
|
CVFD::getInstance()->showAudioPlayMode(CVFD::AUDIO_MODE_PAUSE);
|
||||||
@@ -2327,7 +2327,7 @@ void CAudioPlayerGui::getFileInfoToDisplay(std::string &fileInfo, CAudiofileExt
|
|||||||
{
|
{
|
||||||
fileInfo += "Unknown";
|
fileInfo += "Unknown";
|
||||||
}
|
}
|
||||||
file.firstChar = tolower(fileInfo[0]);
|
file.firstChar = (char)tolower(fileInfo[0]);
|
||||||
//info += fileInfo;
|
//info += fileInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -81,7 +81,7 @@ class RandomNumber
|
|||||||
|
|
||||||
int operator()(int n)
|
int operator()(int n)
|
||||||
{
|
{
|
||||||
return ((int64_t)n * rand() / RAND_MAX);
|
return (n * rand() / RAND_MAX);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user