()
| 326 | } |
| 327 | |
| 328 | func (r *sampleRing) reset() { |
| 329 | r.l = 0 |
| 330 | r.i = -1 |
| 331 | r.f = 0 |
| 332 | r.bufInUse = noBuf |
| 333 | |
| 334 | // The first sample after the reset will always go to a specialized |
| 335 | // buffer. If we later need to change to the interface buffer, we'll |
| 336 | // copy from the specialized buffer to the interface buffer. For that to |
| 337 | // work properly, we have to reset the interface buffer here, too. |
| 338 | r.iBuf = r.iBuf[:0] |
| 339 | } |
| 340 | |
| 341 | // Resets and returns the iterator. Invalidates previously returned iterators. |
| 342 | func (r *sampleRing) iterator() *SampleRingIterator { |
no outgoing calls