not sure if this helps: when the file end is reached, playback should be stopped.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16845 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Marcus Overhagen
2006-03-20 19:28:03 +00:00
parent c572fade42
commit f7c354d7ee
+4 -1
View File
@@ -452,7 +452,10 @@ BFileGameSound::Load()
{
int64 frames;
char * buffer = &fBuffer[fBufferSize + fAudioStream->position];
fAudioStream->stream->ReadFrames(buffer, &frames);
status_t err = fAudioStream->stream->ReadFrames(buffer, &frames);
if (err < B_OK) {
StopPlaying(); // XXX this is a hack, the whole class design is broken
}
int32 frame = fAudioStream->stream->CurrentFrame();