doc: Now retunring values don't have to be cared

This commit is contained in:
Hajime Hoshi 2017-03-04 12:04:19 +09:00
parent 283c8d41ca
commit fb96125693
3 changed files with 5 additions and 7 deletions

View File

@ -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
} }

View File

@ -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 {

View File

@ -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
} }