mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
doc: Slight fix
This commit is contained in:
parent
9a7e5683a1
commit
c8b9226b59
@ -37,7 +37,7 @@ pre {
|
||||
<li>Windows</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="http://godoc.org/github.com/hajimehoshi/ebiten">API Docs</a></li>
|
||||
<li><a href="http://godoc.org/github.com/hajimehoshi/ebiten"><img src="https://godoc.org/github.com/hajimehoshi/ebiten?status.svg" alt="GoDoc"></a></li>
|
||||
<li><a href="http://github.com/hajimehoshi/ebiten">GitHub project page</a> (Development version: v{{.DevVersion}})</li>
|
||||
</ul>
|
||||
|
||||
@ -98,7 +98,7 @@ pre {
|
||||
</ul>
|
||||
|
||||
<h2>Change Log</h2>
|
||||
<h3>2016-04-14</h3>
|
||||
<h3>2016-04-22</h3>
|
||||
<ul>
|
||||
<li>v1.3.0-rc1 released.
|
||||
<ul>
|
||||
|
@ -46,10 +46,10 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/hajimehoshi/ebiten"
|
||||
"github.com/hajimehoshi/ebiten/audio"
|
||||
"github.com/hajimehoshi/ebiten/audio/vorbis"
|
||||
"github.com/hajimehoshi/ebiten/audio/wav"
|
||||
"github.com/hajimehoshi/ebiten/ebitenutil"
|
||||
"github.com/hajimehoshi/ebiten/exp/audio"
|
||||
"github.com/hajimehoshi/ebiten/exp/audio/vorbis"
|
||||
"github.com/hajimehoshi/ebiten/exp/audio/wav"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -123,7 +123,7 @@ func (p *Player) updateSE() error {
|
||||
}
|
||||
if sePlayer == nil {
|
||||
var err error
|
||||
sePlayer, err = audioContext.NewPlayer(seStream)
|
||||
sePlayer, err = audio.NewPlayer(audioContext, seStream)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -189,7 +189,8 @@ func (p *Player) updateBar() error {
|
||||
}
|
||||
x, y := ebiten.CursorPosition()
|
||||
bx, by, bw, bh := playerBarRect()
|
||||
if y < by || by+bh <= y {
|
||||
const padding = 4
|
||||
if y < by-padding || by+bh+padding <= y {
|
||||
return nil
|
||||
}
|
||||
if x < bx || bx+bw <= x {
|
||||
@ -298,7 +299,7 @@ func main() {
|
||||
log.Fatal(err)
|
||||
return
|
||||
}
|
||||
p, err := audioContext.NewPlayer(s)
|
||||
p, err := audio.NewPlayer(audioContext, s)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
return
|
||||
|
@ -46,9 +46,9 @@ import (
|
||||
"math"
|
||||
|
||||
"github.com/hajimehoshi/ebiten"
|
||||
"github.com/hajimehoshi/ebiten/audio"
|
||||
"github.com/hajimehoshi/ebiten/ebitenutil"
|
||||
"github.com/hajimehoshi/ebiten/examples/common"
|
||||
"github.com/hajimehoshi/ebiten/exp/audio"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -116,7 +116,7 @@ func (s *stream) Close() error {
|
||||
func addNote(freq float64, vol float64) error {
|
||||
f := int(freq)
|
||||
if n, ok := noteCache[f]; ok {
|
||||
p, err := audioContext.NewPlayer(&stream{bytes.NewReader(n)})
|
||||
p, err := audio.NewPlayer(audioContext, &stream{bytes.NewReader(n)})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -137,7 +137,7 @@ func addNote(freq float64, vol float64) error {
|
||||
}
|
||||
n := toBytes(l, r)
|
||||
noteCache[f] = n
|
||||
p, err := audioContext.NewPlayer(&stream{bytes.NewReader(n)})
|
||||
p, err := audio.NewPlayer(audioContext, &stream{bytes.NewReader(n)})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ pre {
|
||||
<li>Windows</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="http://godoc.org/github.com/hajimehoshi/ebiten">API Docs</a></li>
|
||||
<li><a href="http://godoc.org/github.com/hajimehoshi/ebiten"><img src="https://godoc.org/github.com/hajimehoshi/ebiten?status.svg" alt="GoDoc"></a></li>
|
||||
<li><a href="http://github.com/hajimehoshi/ebiten">GitHub project page</a> (Development version: v1.3.0-alpha)</li>
|
||||
</ul>
|
||||
|
||||
@ -110,7 +110,7 @@ pre {
|
||||
</ul>
|
||||
|
||||
<h2>Change Log</h2>
|
||||
<h3>2016-04-14</h3>
|
||||
<h3>2016-04-22</h3>
|
||||
<ul>
|
||||
<li>v1.3.0-rc1 released.
|
||||
<ul>
|
||||
|
Loading…
Reference in New Issue
Block a user