コード例 #1
0
func (*context) Render(pm nimble.PixMap) {
	switch counter {
	case 0:
		nimble.PlaySound(Wobble, 1, 1)
	case 30:
		nimble.PlaySound(Twang, 1, 1.5)
	case 60:
		nimble.PlaySound(Bell, 1, 1)
	case 90:
		nimble.PlaySound(Bell, 1, 0.75)
	case 120:
		nimble.PlaySound(AntiTwang, 1, 1)
	case 210:
		nimble.PlaySound(Broken, 1, 1)
	}
	counter++
}
コード例 #2
0
ファイル: sound.go プロジェクト: ArchRobison/FrequonInvaders
func Play(wave []float32, relativePitch float32) {
	nimble.PlaySound(wave, 1, relativePitch)
}