()
| 161 | } |
| 162 | |
| 163 | func (c *context) wait() bool { |
| 164 | c.cond.L.Lock() |
| 165 | defer c.cond.L.Unlock() |
| 166 | |
| 167 | for len(c.unqueuedBuffers) == 0 && c.err.Load() == nil && !c.toPause && !c.toResume { |
| 168 | c.cond.Wait() |
| 169 | } |
| 170 | return c.err.Load() == nil |
| 171 | } |
| 172 | |
| 173 | func (c *context) loop() { |
| 174 | buf32 := make([]float32, c.oneBufferSizeInBytes/4) |