mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
parent
ac526b1b83
commit
95a98950b8
@ -141,7 +141,7 @@ func init() {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
jabD, err := wav.Decode(audioContext, bytes.NewReader(raudio.Jab48000_wav))
|
||||
jabD, err := wav.Decode(audioContext, bytes.NewReader(raudio.Jab_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
Binary file not shown.
@ -13,7 +13,6 @@
|
||||
// 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
|
||||
|
@ -46,13 +46,13 @@ func init() {
|
||||
// Initialize audio context.
|
||||
g.audioContext = audio.NewContext(sampleRate)
|
||||
|
||||
// In this example, embedded resource "Jab48000_wav" is used.
|
||||
// In this example, embedded resource "Jab_wav" is used.
|
||||
//
|
||||
// If you want to use a wav file, open this and pass the file stream to wav.Decode.
|
||||
// Note that file's Close() should not be closed here
|
||||
// since audio.Player manages stream state.
|
||||
//
|
||||
// f, err := os.Open("jab48000.wav")
|
||||
// f, err := os.Open("jab.wav")
|
||||
// if err != nil {
|
||||
// return err
|
||||
// }
|
||||
@ -61,7 +61,7 @@ func init() {
|
||||
// ...
|
||||
|
||||
// Decode wav-formatted data and retrieve decoded PCM stream.
|
||||
d, err := wav.Decode(g.audioContext, bytes.NewReader(raudio.Jab48000_wav))
|
||||
d, err := wav.Decode(g.audioContext, bytes.NewReader(raudio.Jab_wav))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user