-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMPI_AudioSynth.cpp
48 lines (38 loc) · 1.03 KB
/
MPI_AudioSynth.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//
// MPI_AudioSynth.cpp
//
#include "MPI_AudioSynth.h"
#include "MPI_Audio.h"
MPI_AudioSynth::MPI_AudioSynth( MPI_Audio &audioinstance ) :
audioinstance_( audioinstance ),
active_( false )
{
// empty
}
MPI_AudioSynth::~MPI_AudioSynth()
{
// empty
}
void MPI_AudioSynth::addSynthToAudioInstance( void )
{
// This needs to be called at the END of the constructor in a derived
// class. The derived classes data members should all be in a callable
// state before addSynthToAudioInstance() is called.
audioinstance_.addSynth( this );
}
void MPI_AudioSynth::removeSynthFromAudioInstance( void )
{
// This needs to be called at the BEGINNING of the destructor in a derived
// class. The derived classes data members should all be in a callable
// state until addSynthToAudioInstance() has returned.
audioinstance_.removeSynth( this );
}
void MPI_AudioSynth::setActiveFlag( bool value )
{
active_ = value;
}
bool MPI_AudioSynth::isActive( void ) const
{
return active_;
}
// vim:sw=4:et:cindent: