doc: Slight fix

This commit is contained in:
Hajime Hoshi 2016-04-21 23:24:53 +09:00
parent 9a7e5683a1
commit c8b9226b59
4 changed files with 14 additions and 13 deletions

View File

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

View File

@ -46,10 +46,10 @@ import (
&#34;time&#34;
&#34;github.com/hajimehoshi/ebiten&#34;
&#34;github.com/hajimehoshi/ebiten/audio&#34;
&#34;github.com/hajimehoshi/ebiten/audio/vorbis&#34;
&#34;github.com/hajimehoshi/ebiten/audio/wav&#34;
&#34;github.com/hajimehoshi/ebiten/ebitenutil&#34;
&#34;github.com/hajimehoshi/ebiten/exp/audio&#34;
&#34;github.com/hajimehoshi/ebiten/exp/audio/vorbis&#34;
&#34;github.com/hajimehoshi/ebiten/exp/audio/wav&#34;
)
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 &lt; by || by&#43;bh &lt;= y {
const padding = 4
if y &lt; by-padding || by&#43;bh&#43;padding &lt;= y {
return nil
}
if x &lt; bx || bx&#43;bw &lt;= 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

View File

@ -46,9 +46,9 @@ import (
&#34;math&#34;
&#34;github.com/hajimehoshi/ebiten&#34;
&#34;github.com/hajimehoshi/ebiten/audio&#34;
&#34;github.com/hajimehoshi/ebiten/ebitenutil&#34;
&#34;github.com/hajimehoshi/ebiten/examples/common&#34;
&#34;github.com/hajimehoshi/ebiten/exp/audio&#34;
)
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(&amp;stream{bytes.NewReader(n)})
p, err := audio.NewPlayer(audioContext, &amp;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(&amp;stream{bytes.NewReader(n)})
p, err := audio.NewPlayer(audioContext, &amp;stream{bytes.NewReader(n)})
if err != nil {
return err
}

View File

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