mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-11 19:48:54 +01:00
audio: Add NopCloser
This commit is contained in:
parent
ed8d87dd87
commit
8b4389856d
@ -279,6 +279,20 @@ type ReadSeekCloser interface {
|
|||||||
io.Closer
|
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.
|
// Player is an audio player which has one stream.
|
||||||
type Player struct {
|
type Player struct {
|
||||||
players *players
|
players *players
|
||||||
|
Loading…
Reference in New Issue
Block a user