Properly stream wav files+reduce effect of oto bug

This commit is contained in:
bloeys
2022-06-27 01:54:22 +04:00
parent 8f19e800f1
commit daf46e5d41
4 changed files with 159 additions and 10 deletions

View File

@ -113,6 +113,17 @@ func TestSound(t *testing.T) {
}
s.PlaySync()
//Streaming wav
s, err = wavy.NewSoundStreaming(wavFPath)
if err != nil {
t.Errorf("Failed to load streaming sound with path '%s'. Err: %s\n", tadaFilepath, err)
return
}
s.SeekToPercent(0.0)
s.PlaySync()
s.SeekToPercent(0.0)
s.PlaySync()
//Ogg
const oggFPath = "./test_audio_files/camera.ogg"
s, err = wavy.NewSoundMem(oggFPath)