mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-13 20:42:07 +01:00
audio: Fix comments
This commit is contained in:
parent
876340da17
commit
396f257629
@ -324,8 +324,6 @@ func NewPlayerFromBytes(context *Context, src []byte) (*Player, error) {
|
|||||||
|
|
||||||
func (p *Player) finalize() {
|
func (p *Player) finalize() {
|
||||||
runtime.SetFinalizer(p, nil)
|
runtime.SetFinalizer(p, nil)
|
||||||
// TODO: It is really hard to say concurrent safety.
|
|
||||||
// Refactor this package to reduce goroutines.
|
|
||||||
if !p.IsPlaying() {
|
if !p.IsPlaying() {
|
||||||
p.Close()
|
p.Close()
|
||||||
}
|
}
|
||||||
@ -352,6 +350,7 @@ func (p *playerImpl) Close() error {
|
|||||||
}
|
}
|
||||||
p.closedExplicitly = true
|
p.closedExplicitly = true
|
||||||
// src.Close is called only when Player's Close is called.
|
// src.Close is called only when Player's Close is called.
|
||||||
|
// TODO: Is it ok not to call src.Close when GCed?
|
||||||
if err := p.src.Close(); err != nil {
|
if err := p.src.Close(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user