Be explicit about some type conversions in OpenAL audio player to avoid warnings. Fixes #651.

Originally committed to SVN as r2200.
This commit is contained in:
Niels Martin Hansen 2008-06-15 12:43:56 +00:00
parent 1c60d35d16
commit 324ce7dbff
1 changed files with 2 additions and 2 deletions

View File

@ -231,7 +231,7 @@ void OpenALPlayer::FillBuffers(ALsizei count)
ALuint bufid = buf_first_free;
while (count > 0) {
ALsizei fill_len = buffer_length;
if (fill_len > end_frame - cur_frame) fill_len = end_frame - cur_frame;
if (fill_len > (ALsizei)(end_frame - cur_frame)) fill_len = (ALsizei)(end_frame - cur_frame);
wxLogDebug(_T("buffer_length=%d, fill_len=%d, end_frame-cur_frame=%d"), buffer_length, fill_len, end_frame-cur_frame);
if (fill_len > 0)
@ -330,7 +330,7 @@ int64_t OpenALPlayer::GetEndPosition()
int64_t OpenALPlayer::GetCurrentPosition()
{
// FIXME: this should be based on not duration played but actual sample being heard
// (during vidoeo playback, cur_frame might get changed to resync)
// (during video playback, cur_frame might get changed to resync)
long extra = playback_segment_timer.Time();
return buffers_played * buffer_length + start_frame + extra * samplerate / 1000;
}