Many sounds from one data buffer+volume control

This commit is contained in:
bloeys
2022-06-25 20:44:03 +04:00
parent cdc8d47353
commit ca4db3a12b
3 changed files with 45 additions and 13 deletions

View File

@ -1,7 +1,6 @@
package wavy_test
import (
"io"
"testing"
"time"
@ -85,7 +84,9 @@ func TestSound(t *testing.T) {
s.PlaySync()
//Test repeat playing
s.Player.Reset()
s.Data.Seek(0, io.SeekStart)
s.PlaySync()
s2 := wavy.CopyInMemSound(s)
s2.SetVolume(0.25)
s.PlaySync() //Already finished, should not play
s2.PlaySync() //Should play from beginning
}