mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +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