Player holds the underlying audio data and plays/pauses/stops/rewinds/seeks it.
| 18 | |
| 19 | // Player holds the underlying audio data and plays/pauses/stops/rewinds/seeks it. |
| 20 | type Player struct { |
| 21 | isPlaying bool |
| 22 | Repeat bool |
| 23 | |
| 24 | src convert.ReadSeekCloser |
| 25 | url string |
| 26 | srcEOF bool |
| 27 | sampleRate int |
| 28 | |
| 29 | buf []byte |
| 30 | pos int64 |
| 31 | volume float64 |
| 32 | |
| 33 | closeCh chan struct{} |
| 34 | closedCh chan struct{} |
| 35 | readLoopEndedCh chan struct{} |
| 36 | seekCh chan seekArgs |
| 37 | seekedCh chan error |
| 38 | proceedCh chan []int16 |
| 39 | proceededCh chan proceededValues |
| 40 | syncCh chan func() |
| 41 | } |
| 42 | |
| 43 | type seekArgs struct { |
| 44 | offset int64 |
nothing calls this directly
no outgoing calls
no test coverage detected