fix a bug in the OpenAL audio player where it would crash if you tried to stop playback by moving the line end marker to before the playback cursor. credits to jfs.

Originally committed to SVN as r2364.
This commit is contained in:
Karl Blomster 2008-09-18 23:14:12 +00:00
parent 0dc49108c4
commit 743527eeb8
1 changed files with 1 additions and 0 deletions

View File

@ -232,6 +232,7 @@ void OpenALPlayer::FillBuffers(ALsizei count)
while (count > 0) {
ALsizei fill_len = buffer_length;
if (fill_len > (ALsizei)(end_frame - cur_frame)) fill_len = (ALsizei)(end_frame - cur_frame);
if (fill_len < 0) fill_len = 0;
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)