mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 11:48:55 +01:00
examples/flappy: Change the sample rate to 48000
This commit is contained in:
parent
7f67fb7b90
commit
0247261d34
@ -126,7 +126,7 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
audioContext = audio.NewContext(44100)
|
audioContext = audio.NewContext(48000)
|
||||||
jumpPlayer *audio.Player
|
jumpPlayer *audio.Player
|
||||||
hitPlayer *audio.Player
|
hitPlayer *audio.Player
|
||||||
)
|
)
|
||||||
@ -141,7 +141,7 @@ func init() {
|
|||||||
log.Fatal(err)
|
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 {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
5
examples/resources/audio/jab48000.go
Normal file
5
examples/resources/audio/jab48000.go
Normal file
File diff suppressed because one or more lines are too long
BIN
examples/resources/audio/jab48000.wav
Normal file
BIN
examples/resources/audio/jab48000.wav
Normal file
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
BIN
examples/resources/audio/jump.ogg
Executable file → Normal file
Binary file not shown.
@ -13,6 +13,7 @@
|
|||||||
// limitations under the License.
|
// 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/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/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.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
|
//go:generate file2byteslice -package=audio -input=./audio/ragtime.ogg -output=./audio/ragtime.ogg.go -var=Ragtime_ogg
|
||||||
|
Loading…
Reference in New Issue
Block a user