-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMPI_AudioParticleFactory.h
61 lines (42 loc) · 1.41 KB
/
MPI_AudioParticleFactory.h
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
49
50
51
52
53
54
55
56
57
58
59
60
61
//
// MPI_AudioParticleFactory.h
//
// Description:
// audio version of MPI_ParticleFactory
//
#ifndef __MPI_AUDIOPARTICLEFACTORY_H__
#define __MPI_AUDIOPARTICLEFACTORY_H__
#include "MPI_ParticleFactory.h"
#include "MPI_AudioWavetable.h"
#include <vector>
class MPI_Audio;
class MPI_AudioParticleFactory : public MPI_ParticleFactory
{
private:
class AudioPlayheadStrokeState : public MPI_ParticleFactory::ParticleFactoryState
{
public:
AudioPlayheadStrokeState( MPI_AudioParticleFactory &factory ) : audioparticlefactory_(factory) {}
MPI_PolyLine* createPolyLine( void ) const;
private:
// NB: this reference needs to be non-const since getWavetable() is
// non-const and we need to call it.
MPI_AudioParticleFactory &audioparticlefactory_;
};
public:
MPI_AudioParticleFactory( MPI_Audio &audioinstance, MPI_Workspace &workspace, MPI_Scheduler &scheduler );
MPI_Audio& getAudioInstance( void ) const;
MPI_AudioWavetable& getWavetable( void );
virtual void setStatePlayheadStroke( unsigned int strokenum );
private:
MPI_Audio &audioinstance_;
// state instances
AudioPlayheadStrokeState audioplayheadstrokestate_;
// wavetables
std::vector<MPI_AudioWavetable*> wavetables_;
// currently selected wavetable
int currentwavetable_;
static char const *samplelistfilename_;
};
#endif
// vim:sw=4:et:cindent: