mirror of
https://github.com/thestk/stk
synced 2026-01-16 06:21:51 +00:00
Version 4.4.3
This commit is contained in:
committed by
Stephen Sinclair
parent
baca57040b
commit
0aec39260a
18
src/Blit.cpp
18
src/Blit.cpp
@@ -27,6 +27,11 @@ namespace stk {
|
||||
|
||||
Blit:: Blit( StkFloat frequency )
|
||||
{
|
||||
if ( frequency <= 0.0 ) {
|
||||
oStream_ << "Blit::Blit: argument (" << frequency << ") must be positive!";
|
||||
handleError( StkError::FUNCTION_ARGUMENT );
|
||||
}
|
||||
|
||||
nHarmonics_ = 0;
|
||||
this->setFrequency( frequency );
|
||||
this->reset();
|
||||
@@ -44,10 +49,10 @@ void Blit :: reset()
|
||||
|
||||
void Blit :: setFrequency( StkFloat frequency )
|
||||
{
|
||||
#if defined(_STK_DEBUG_)
|
||||
errorString_ << "Blit::setFrequency: frequency = " << frequency << '.';
|
||||
handleError( StkError::DEBUG_WARNING );
|
||||
#endif
|
||||
if ( frequency <= 0.0 ) {
|
||||
oStream_ << "Blit::setFrequency: argument (" << frequency << ") must be positive!";
|
||||
handleError( StkError::WARNING ); return;
|
||||
}
|
||||
|
||||
p_ = Stk::sampleRate() / frequency;
|
||||
rate_ = PI / p_;
|
||||
@@ -68,11 +73,6 @@ void Blit :: updateHarmonics( void )
|
||||
}
|
||||
else
|
||||
m_ = 2 * nHarmonics_ + 1;
|
||||
|
||||
#if defined(_STK_DEBUG_)
|
||||
errorString_ << "Blit::updateHarmonics: nHarmonics_ = " << nHarmonics_ << ", m_ = " << m_ << '.';
|
||||
handleError( StkError::DEBUG_WARNING );
|
||||
#endif
|
||||
}
|
||||
|
||||
} // stk namespace
|
||||
|
||||
Reference in New Issue
Block a user