mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-27 11:12:44 +01:00
audio: Refactoring
This commit is contained in:
parent
7cc6154de6
commit
3dcb486a5c
@ -320,11 +320,6 @@ func BytesReadSeekCloser(b []byte) ReadSeekCloser {
|
|||||||
return &bytesReadSeekCloser{reader: bytes.NewReader(b)}
|
return &bytesReadSeekCloser{reader: bytes.NewReader(b)}
|
||||||
}
|
}
|
||||||
|
|
||||||
type readingResult struct {
|
|
||||||
data []byte
|
|
||||||
err error
|
|
||||||
}
|
|
||||||
|
|
||||||
// Player is an audio player which has one stream.
|
// Player is an audio player which has one stream.
|
||||||
type Player struct {
|
type Player struct {
|
||||||
players *players
|
players *players
|
||||||
@ -467,7 +462,7 @@ func (p *Player) startRead() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *Player) readLoop() {
|
func (p *Player) readLoop() {
|
||||||
t := time.Tick(1 * time.Millisecond)
|
t := time.Tick(time.Millisecond)
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case <-p.closeCh:
|
case <-p.closeCh:
|
||||||
|
Loading…
Reference in New Issue
Block a user