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:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user