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
|
||||
}
|
||||
|
||||
func (p *dummyPlayer) Reset() {
|
||||
p.m.Lock()
|
||||
defer p.m.Unlock()
|
||||
p.playing = false
|
||||
}
|
||||
|
||||
func (p *dummyPlayer) Volume() float64 {
|
||||
return p.volume
|
||||
}
|
||||
|
@ -275,16 +275,6 @@ func (p *playerImpl) Seek(offset int64, whence int) (int64, error) {
|
||||
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() {
|
||||
if p.state == playerClosed {
|
||||
return
|
||||
|
@ -27,7 +27,6 @@ type player interface {
|
||||
Pause()
|
||||
Play()
|
||||
IsPlaying() bool
|
||||
Reset()
|
||||
Volume() float64
|
||||
SetVolume(volume float64)
|
||||
UnplayedBufferSize() int
|
||||
|
Loading…
Reference in New Issue
Block a user