修正有的音频文件播放到快结束果卡住的问题 #78

This commit is contained in:
Zhong Yang
2020-07-22 15:43:41 +08:00
parent 7c63fe5712
commit 272cecaeca
+1 -1
View File
@@ -622,7 +622,7 @@ bool CPlayer::SongIsOver() const
bool song_is_over;
static int last_pos;
if ((m_playing == 2 && m_current_position.toInt() == last_pos && m_current_position.toInt() != 0 //如果正在播放且当前播放的位置没有发生变化且当前播放位置不为0,
&& m_current_position.toInt() > m_song_length.toInt() - 2000) //且播放进度到了最后2秒
/*&& m_current_position.toInt() > m_song_length.toInt() - 2000*/) //且播放进度到了最后2秒
|| m_error_code == BASS_ERROR_ENDED) //或者出现BASS_ERROR_ENDED错误,则判断当前歌曲播放完了
//有时候会出现识别的歌曲长度超过实际歌曲长度的问题,这样会导致歌曲播放进度超过实际歌曲结尾时会出现BASS_ERROR_ENDED错误,
//检测到这个错误时直接判断歌曲已经播放完了。