mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-12 20:18:59 +01:00
doc: Now retunring values don't have to be cared
This commit is contained in:
parent
283c8d41ca
commit
fb96125693
@ -85,9 +85,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func update(screen *ebiten.Image) error {
|
func update(screen *ebiten.Image) error {
|
||||||
if err := ebitenutil.DebugPrint(screen, "Hello world!"); err != nil {
|
ebitenutil.DebugPrint(screen, "Hello world!")
|
||||||
return err
|
|
||||||
}
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -281,7 +281,9 @@ func main() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
const sampleRate = 44100
|
// This sample rate doesn't match with wav/ogg's sample rate,
|
||||||
|
// but decoders adjust them.
|
||||||
|
const sampleRate = 48000
|
||||||
const bytesPerSample = 4 // TODO: This should be defined in audio package
|
const bytesPerSample = 4 // TODO: This should be defined in audio package
|
||||||
audioContext, err = audio.NewContext(sampleRate)
|
audioContext, err = audio.NewContext(sampleRate)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -117,9 +117,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func update(screen *ebiten.Image) error {
|
func update(screen *ebiten.Image) error {
|
||||||
if err := ebitenutil.DebugPrint(screen, "Hello world!"); err != nil {
|
ebitenutil.DebugPrint(screen, "Hello world!")
|
||||||
return err
|
|
||||||
}
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user