3 |
* LinuxSampler - modular, streaming capable sampler * |
* LinuxSampler - modular, streaming capable sampler * |
4 |
* * |
* * |
5 |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
6 |
* Copyright (C) 2005 - 2009 Christian Schoenebeck * |
* Copyright (C) 2005 - 2016 Christian Schoenebeck * |
7 |
* Copyright (C) 2009 Grigor Iliev * |
* Copyright (C) 2009 Grigor Iliev * |
8 |
* * |
* * |
9 |
* This program is free software; you can redistribute it and/or modify * |
* This program is free software; you can redistribute it and/or modify * |
105 |
inline void IncrementReadPos(uint Count) { |
inline void IncrementReadPos(uint Count) { |
106 |
Count *= SampleInfo.BytesPerSample; |
Count *= SampleInfo.BytesPerSample; |
107 |
uint leftspace = pRingBuffer->read_space(); |
uint leftspace = pRingBuffer->read_space(); |
108 |
pRingBuffer->increment_read_ptr(Min(Count, leftspace)); |
pRingBuffer->increment_read_ptr((int)Min(Count, leftspace)); |
109 |
if (State == state_end && Count >= leftspace) { |
if (State == state_end && Count >= leftspace) { |
110 |
Reset(); // quit relation between consumer (voice) and stream and reset stream right after |
Reset(); // quit relation between consumer (voice) and stream and reset stream right after |
111 |
} |
} |