mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
examples/piano: Add comments
This commit is contained in:
parent
bd1e81ec4a
commit
401e031349
@ -90,6 +90,9 @@ func (s *stream) Close() error {
|
||||
}
|
||||
|
||||
func addNote(freq float64, vol float64) error {
|
||||
// TODO: Call Close method of *audio.Player.
|
||||
// However, this works without Close because Close is automatically called when GC
|
||||
// collects a *audio.Player object.
|
||||
f := int(freq)
|
||||
if n, ok := noteCache[f]; ok {
|
||||
p, err := audio.NewPlayer(audioContext, &stream{bytes.NewReader(n)})
|
||||
|
Loading…
Reference in New Issue
Block a user