| @@ -26,17 +26,17 @@ · 25 unmodified lines |
| 26 | | 26 | |
| 27 | void tBuffer_init (tBuffer* const sb, uint32_t length, LEAF* const leaf) | 27 | void tBuffer_init (tBuffer* const sb, uint32_t length, LEAF* const leaf) |
| 28 | { | 28 | { |
| 29 | tBuffer_initToPool(sb, length, &leaf->mempool, leaf); | 29 | tBuffer_initToPool(sb, length, &leaf->mempool); |
| 30 | } | 30 | } |
| 31 | | 31 | |
| 32 | void tBuffer_initToPool (tBuffer* const sb, uint32_t length, tMempool* const mp, LEAF* const leaf) | 32 | void tBuffer_initToPool (tBuffer* const sb, uint32_t length, tMempool* const mp) |
| 33 | { | 33 | { |
| 34 | _tMempool* m = *mp; | 34 | _tMempool* m = *mp; |
| 35 | _tBuffer* s = *sb = (_tBuffer*) mpool_alloc(sizeof(_tBuffer), m); | 35 | _tBuffer* s = *sb = (_tBuffer*) mpool_alloc(sizeof(_tBuffer), m); |
| 36 | s->mempool = m; | 36 | s->mempool = m; |
| 37 | | 37 | |
| 38 | s->buff = (float*) mpool_alloc( sizeof(float) * length, m); | 38 | s->buff = (float*) mpool_alloc( sizeof(float) * length, m); |
| 39 | s->sampleRate = leaf->sampleRate; | 39 | s->sampleRate = s->mempool->leaf->sampleRate; |
| 40 | s->channels = 1; | 40 | s->channels = 1; |
| 41 | s->bufferLength = length; | 41 | s->bufferLength = length; |
| 42 | s->recordedLength = 0; | 42 | s->recordedLength = 0; |
| @@ -273,7 +273,6 @@ void tSampler_setSample (tSampler* const sp, tBuffer* const b) · 230 unmodified lines |
| 273 | float tSampler_tick (tSampler* const sp) | 273 | float tSampler_tick (tSampler* const sp) |
| 274 | { | 274 | { |
| 275 | _tSampler* p = *sp; | 275 | _tSampler* p = *sp; |
| 276 | LEAF* leaf = p->mempool->leaf; | | |
| 277 | | 276 | |
| 278 | attemptStartEndChange(sp); | 277 | attemptStartEndChange(sp); |
| 279 | | 278 | |
| @@ -538,7 +537,6 @@ float tSampler_tick (tSampler* const sp) · 258 unmodified lines |
| 538 | float tSampler_tickStereo (tSampler* const sp, float* outputArray) | 537 | float tSampler_tickStereo (tSampler* const sp, float* outputArray) |
| 539 | { | 538 | { |
| 540 | _tSampler* p = *sp; | 539 | _tSampler* p = *sp; |
| 541 | LEAF* leaf = p->mempool->leaf; | | |
| 542 | | 540 | |
| 543 | attemptStartEndChange(sp); | 541 | attemptStartEndChange(sp); |
| 544 | | 542 | |