mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
audio: refactoring: remove Reset from Player
This commit is contained in:
parent
7232b1a8a9
commit
8cb023e3c8
@ -79,12 +79,6 @@ func (p *dummyPlayer) IsPlaying() bool {
|
|||||||
return p.playing
|
return p.playing
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *dummyPlayer) Reset() {
|
|
||||||
p.m.Lock()
|
|
||||||
defer p.m.Unlock()
|
|
||||||
p.playing = false
|
|
||||||
}
|
|
||||||
|
|
||||||
func (p *dummyPlayer) Volume() float64 {
|
func (p *dummyPlayer) Volume() float64 {
|
||||||
return p.volume
|
return p.volume
|
||||||
}
|
}
|
||||||
|
@ -275,16 +275,6 @@ func (p *playerImpl) Seek(offset int64, whence int) (int64, error) {
|
|||||||
return s.Seek(offset, whence)
|
return s.Seek(offset, whence)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *Player) Reset() {
|
|
||||||
p.p.Reset()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (p *playerImpl) Reset() {
|
|
||||||
p.m.Lock()
|
|
||||||
defer p.m.Unlock()
|
|
||||||
p.resetImpl()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (p *playerImpl) resetImpl() {
|
func (p *playerImpl) resetImpl() {
|
||||||
if p.state == playerClosed {
|
if p.state == playerClosed {
|
||||||
return
|
return
|
||||||
|
@ -27,7 +27,6 @@ type player interface {
|
|||||||
Pause()
|
Pause()
|
||||||
Play()
|
Play()
|
||||||
IsPlaying() bool
|
IsPlaying() bool
|
||||||
Reset()
|
|
||||||
Volume() float64
|
Volume() float64
|
||||||
SetVolume(volume float64)
|
SetVolume(volume float64)
|
||||||
UnplayedBufferSize() int
|
UnplayedBufferSize() int
|
||||||
|
Loading…
Reference in New Issue
Block a user