New creates a new Mux.
(sampleRate int, channelCount int, format Format)
| 59 | |
| 60 | // New creates a new Mux. |
| 61 | func New(sampleRate int, channelCount int, format Format) *Mux { |
| 62 | m := &Mux{ |
| 63 | sampleRate: sampleRate, |
| 64 | channelCount: channelCount, |
| 65 | format: format, |
| 66 | cond: sync.NewCond(&sync.Mutex{}), |
| 67 | } |
| 68 | go m.loop() |
| 69 | return m |
| 70 | } |
| 71 | |
| 72 | func (m *Mux) shouldWait() bool { |
| 73 | for p := range m.players { |
no test coverage detected