examples/flappy: Change the sample rate to 48000

This commit is contained in:
Hajime Hoshi 2021-05-23 22:04:41 +09:00
parent 7f67fb7b90
commit 0247261d34
6 changed files with 9 additions and 3 deletions

View File

@ -126,7 +126,7 @@ func init() {
}
var (
audioContext = audio.NewContext(44100)
audioContext = audio.NewContext(48000)
jumpPlayer *audio.Player
hitPlayer *audio.Player
)
@ -141,7 +141,7 @@ func init() {
log.Fatal(err)
}
jabD, err := wav.Decode(audioContext, bytes.NewReader(raudio.Jab_wav))
jabD, err := wav.Decode(audioContext, bytes.NewReader(raudio.Jab48000_wav))
if err != nil {
log.Fatal(err)
}

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

BIN
examples/resources/audio/jump.ogg Executable file → Normal file

Binary file not shown.

View File

@ -13,6 +13,7 @@
// limitations under the License.
//go:generate file2byteslice -package=audio -input=./audio/jab.wav -output=./audio/jab.go -var=Jab_wav
//go:generate file2byteslice -package=audio -input=./audio/jab48000.wav -output=./audio/jab48000.go -var=Jab48000_wav
//go:generate file2byteslice -package=audio -input=./audio/jump.ogg -output=./audio/jump.go -var=Jump_ogg
//go:generate file2byteslice -package=audio -input=./audio/ragtime.mp3 -output=./audio/ragtime.mp3.go -var=Ragtime_mp3
//go:generate file2byteslice -package=audio -input=./audio/ragtime.ogg -output=./audio/ragtime.ogg.go -var=Ragtime_ogg