mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 02:38:53 +01:00
audio: Add NopCloser
This commit is contained in:
parent
ed8d87dd87
commit
8b4389856d
@ -279,6 +279,20 @@ type ReadSeekCloser interface {
|
||||
io.Closer
|
||||
}
|
||||
|
||||
type nopCloser struct {
|
||||
io.ReadSeeker
|
||||
}
|
||||
|
||||
func (*nopCloser) Close() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// NopCloser creates ReadSeekCloser from io.ReadSeeker.
|
||||
// The added Close function is empty and does nothing.
|
||||
func NopCloser(r io.ReadSeeker) ReadSeekCloser {
|
||||
return &nopCloser{r}
|
||||
}
|
||||
|
||||
// Player is an audio player which has one stream.
|
||||
type Player struct {
|
||||
players *players
|
||||
|
Loading…
Reference in New Issue
Block a user