mirror of
https://github.com/thestk/stk
synced 2026-02-07 09:46:16 +00:00
Merge pull request #15 from arielelkin/fix-variable-types-in-TapDelay
Fix variable types in tap delay
This commit is contained in:
@@ -166,8 +166,10 @@ inline StkFrames& TapDelay :: tick( StkFrames& frames, unsigned int channel )
|
|||||||
|
|
||||||
StkFloat *iSamples = &frames[channel];
|
StkFloat *iSamples = &frames[channel];
|
||||||
StkFloat *oSamples = &frames[0];
|
StkFloat *oSamples = &frames[0];
|
||||||
unsigned int j, iHop = frames.channels(), oHop = frames.channels() - outPoint_.size();
|
std::size_t j;
|
||||||
for ( unsigned int i=0; i<frames.frames(); i++, iSamples += iHop, oSamples += oHop ) {
|
unsigned int iHop = frames.channels();
|
||||||
|
std::size_t oHop = frames.channels() - outPoint_.size();
|
||||||
|
for ( unsigned long i=0; i<frames.frames(); i++, iSamples += iHop, oSamples += oHop ) {
|
||||||
inputs_[inPoint_++] = *iSamples * gain_;
|
inputs_[inPoint_++] = *iSamples * gain_;
|
||||||
if ( inPoint_ == inputs_.size() ) inPoint_ = 0;
|
if ( inPoint_ == inputs_.size() ) inPoint_ = 0;
|
||||||
for ( j=0; j<outPoint_.size(); j++ ) {
|
for ( j=0; j<outPoint_.size(); j++ ) {
|
||||||
@@ -196,8 +198,10 @@ inline StkFrames& TapDelay :: tick( StkFrames& iFrames, StkFrames& oFrames, unsi
|
|||||||
|
|
||||||
StkFloat *iSamples = &iFrames[iChannel];
|
StkFloat *iSamples = &iFrames[iChannel];
|
||||||
StkFloat *oSamples = &oFrames[0];
|
StkFloat *oSamples = &oFrames[0];
|
||||||
unsigned int j, iHop = iFrames.channels(), oHop = oFrames.channels() - outPoint_.size();
|
std::size_t j;
|
||||||
for ( unsigned int i=0; i<iFrames.frames(); i++, iSamples += iHop, oSamples += oHop ) {
|
unsigned int iHop = iFrames.channels();
|
||||||
|
std::size_t oHop = oFrames.channels() - outPoint_.size();
|
||||||
|
for ( unsigned long i=0; i<iFrames.frames(); i++, iSamples += iHop, oSamples += oHop ) {
|
||||||
inputs_[inPoint_++] = *iSamples * gain_;
|
inputs_[inPoint_++] = *iSamples * gain_;
|
||||||
if ( inPoint_ == inputs_.size() ) inPoint_ = 0;
|
if ( inPoint_ == inputs_.size() ) inPoint_ = 0;
|
||||||
for ( j=0; j<outPoint_.size(); j++ ) {
|
for ( j=0; j<outPoint_.size(); j++ ) {
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ void TapDelay :: setTapDelays( std::vector<unsigned long> taps )
|
|||||||
if ( taps.size() != outPoint_.size() ) {
|
if ( taps.size() != outPoint_.size() ) {
|
||||||
outPoint_.resize( taps.size() );
|
outPoint_.resize( taps.size() );
|
||||||
delays_.resize( taps.size() );
|
delays_.resize( taps.size() );
|
||||||
lastFrame_.resize( 1, taps.size(), 0.0 );
|
lastFrame_.resize( 1, (unsigned int)taps.size(), 0.0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( unsigned int i=0; i<taps.size(); i++ ) {
|
for ( unsigned int i=0; i<taps.size(); i++ ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user