fix
This commit is contained in:
parent
6f8ee4c7ae
commit
e3bbeb9917
2 changed files with 3 additions and 3 deletions
|
|
@ -21,7 +21,7 @@ int main(){
|
|||
|
||||
drv = new fishbone::SoundDriver();
|
||||
|
||||
snd = drv->mixer.open("dubmood.xm");
|
||||
snd = drv->mixer.open("betrayal.mod");
|
||||
snd->setLoop(true);
|
||||
snd->resume();
|
||||
|
||||
|
|
|
|||
|
|
@ -33,13 +33,13 @@ fishbone::Sound* fishbone::XMPSoundLoader::open(fishbone::Mixer* mixer, void* bu
|
|||
}
|
||||
|
||||
int fishbone::XMPSoundLoader::read(fishbone::Sound* sound, short* buffer, size_t frames) {
|
||||
if(xmp_play_buffer(sound->impl->ctx, buffer, frames * 4, 0) < 0) return -1;
|
||||
if(xmp_play_buffer(sound->impl->ctx, buffer, frames * 4, sound->isLoop() ? 0 : 1) < 0) return -1;
|
||||
|
||||
return frames;
|
||||
}
|
||||
|
||||
void fishbone::XMPSoundLoader::seek(fishbone::Sound* sound, size_t pos) {
|
||||
xmp_set_position(sound->impl->ctx, pos);
|
||||
if(pos == 0) xmp_seek_time(sound->impl->ctx, 0);
|
||||
}
|
||||
|
||||
fishbone::XMPSound::~XMPSound() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue