diff --git a/audio/audio.go b/audio/audio.go index 9a39db189..aaa52f385 100644 --- a/audio/audio.go +++ b/audio/audio.go @@ -399,11 +399,6 @@ func (p *Player) SetVolume(volume float64) { p.p.SetVolume(volume) } -// UnplayedBufferSize returns the amount of unplayed data in the player's buffer in the time duration. -func (p *Player) UnplayedBufferSize() time.Duration { - return p.p.UnplayedBufferSize() -} - // SetBufferSize adjusts the buffer size of the player. // If 0 is specified, the default buffer size is used. // A small buffer size is useful if you want to play a real-time PCM for example. diff --git a/audio/player.go b/audio/player.go index f196bc1f8..bc462f703 100644 --- a/audio/player.go +++ b/audio/player.go @@ -286,18 +286,6 @@ func (p *playerImpl) Err() error { return p.player.Err() } -func (p *playerImpl) UnplayedBufferSize() time.Duration { - p.m.Lock() - defer p.m.Unlock() - - if p.player == nil { - return 0 - } - - samples := p.player.UnplayedBufferSize() / bytesPerSample - return time.Duration(samples) * time.Second / time.Duration(p.factory.sampleRate) -} - func (p *playerImpl) SetBufferSize(bufferSize int) { p.m.Lock() defer p.m.Unlock()