remove verbose print's from ADSR code.

This commit is contained in:
Erwin Coumans
2017-04-27 08:42:28 -07:00
parent dfc1800065
commit c51b22d6f5
2 changed files with 2 additions and 9 deletions

View File

@@ -42,12 +42,11 @@ public:
m_soundSource->setOscillatorAmplitude(1,1); m_soundSource->setOscillatorAmplitude(1,1);
m_soundEngine.addSoundSource(m_soundSource); m_soundEngine.addSoundSource(m_soundSource);
m_soundSource->startSound(); m_soundSource->startSound();
m_soundSource->stopSound();
} }
virtual void exitPhysics() virtual void exitPhysics()
{ {
m_soundSource->stopSound();
m_soundEngine.exit(); m_soundEngine.exit();
} }

View File

@@ -3,7 +3,7 @@
//http://github.com/thestk/stk //http://github.com/thestk/stk
//! ADSR envelope states. //! ADSR envelope states.
#include <stdio.h>
enum enum
{ {
@@ -40,7 +40,6 @@ double b3ADSR::tick()
m_value = m_target; m_value = m_target;
m_target = m_sustainLevel; m_target = m_sustainLevel;
m_state = ADSR_DECAY; m_state = ADSR_DECAY;
printf("ADSR_ATTACK->ADSR_DECAY\n");
} }
break; break;
@@ -52,7 +51,6 @@ double b3ADSR::tick()
{ {
m_value = m_sustainLevel; m_value = m_sustainLevel;
m_state = ADSR_SUSTAIN; m_state = ADSR_SUSTAIN;
printf("ADSR_DECAY->ADSR_SUSTAIN\n");
} }
} }
else else
@@ -62,7 +60,6 @@ double b3ADSR::tick()
{ {
m_value = m_sustainLevel; m_value = m_sustainLevel;
m_state = ADSR_SUSTAIN; m_state = ADSR_SUSTAIN;
printf("ADSR_DECAY->ADSR_SUSTAIN\n");
} }
} }
break; break;
@@ -73,7 +70,6 @@ double b3ADSR::tick()
{ {
m_value = 0.0; m_value = 0.0;
m_state = ADSR_IDLE; m_state = ADSR_IDLE;
printf("ADSR_RELEASE->ADSR_IDLE\n");
} }
} }
@@ -90,13 +86,11 @@ void b3ADSR::keyOn()
if (m_target <= 0.0) if (m_target <= 0.0)
m_target = 1.0; m_target = 1.0;
m_state = ADSR_ATTACK; m_state = ADSR_ATTACK;
printf("keyOn::ADSR_ATTACK\n");
} }
void b3ADSR::keyOff() void b3ADSR::keyOff()
{ {
m_target = 0.0; m_target = 0.0;
m_state = ADSR_RELEASE; m_state = ADSR_RELEASE;
printf("keyOff::ADSR_RELEASE\n");
} }