mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-11 19:48:54 +01:00
audio: Better variable name
This commit is contained in:
parent
2552f1625d
commit
079395dd6f
@ -177,7 +177,7 @@ type Context struct {
|
|||||||
sampleRate int
|
sampleRate int
|
||||||
frames int64
|
frames int64
|
||||||
writtenBytes int64
|
writtenBytes int64
|
||||||
unwrittenCount int
|
discardingCount int
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -270,8 +270,8 @@ func (c *Context) Update() error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
// Discard when the buffer queue seems full.
|
// Discard when the buffer queue seems full.
|
||||||
if c.unwrittenCount > 0 {
|
if c.discardingCount > 0 {
|
||||||
c.unwrittenCount--
|
c.discardingCount--
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
select {
|
select {
|
||||||
@ -280,7 +280,7 @@ func (c *Context) Update() error {
|
|||||||
default:
|
default:
|
||||||
// The current buffer size is 1/15 [sec] = 4 [frames].
|
// The current buffer size is 1/15 [sec] = 4 [frames].
|
||||||
// Wait for 5 [frames] which is more than 4.
|
// Wait for 5 [frames] which is more than 4.
|
||||||
c.unwrittenCount = 5
|
c.discardingCount = 5
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user