Mercurial > hg > svapp
comparison audioio/AudioGenerator.h @ 30:f38b8abd3540
* Pull out temporary directory management into its own class
* Make sure playback plugins get a default sample path in their original
play parameters configuration
* Save play parameters to .sv file (we aren't reloading yet though)
author | Chris Cannam |
---|---|
date | Tue, 25 Apr 2006 22:14:43 +0000 |
parents | dd2084d32652 |
children | 42989c2e621b |
comparison
equal
deleted
inserted
replaced
29:dd2084d32652 | 30:f38b8abd3540 |
---|---|
15 | 15 |
16 #ifndef _AUDIO_GENERATOR_H_ | 16 #ifndef _AUDIO_GENERATOR_H_ |
17 #define _AUDIO_GENERATOR_H_ | 17 #define _AUDIO_GENERATOR_H_ |
18 | 18 |
19 class Model; | 19 class Model; |
20 class ViewManager; | |
21 class NoteModel; | 20 class NoteModel; |
22 class DenseTimeValueModel; | 21 class DenseTimeValueModel; |
23 class SparseOneDimensionalModel; | 22 class SparseOneDimensionalModel; |
24 class RealTimePluginInstance; | 23 class RealTimePluginInstance; |
25 | 24 |
32 class AudioGenerator : public QObject | 31 class AudioGenerator : public QObject |
33 { | 32 { |
34 Q_OBJECT | 33 Q_OBJECT |
35 | 34 |
36 public: | 35 public: |
37 AudioGenerator(ViewManager *); | 36 AudioGenerator(); |
38 virtual ~AudioGenerator(); | 37 virtual ~AudioGenerator(); |
39 | 38 |
40 /** | 39 /** |
41 * Return true if the given model is of a type that we generally | 40 * Return true if the given model is of a type that we generally |
42 * know how to play. This doesn't guarantee that a specific | 41 * know how to play. This doesn't guarantee that a specific |
94 protected slots: | 93 protected slots: |
95 void playPluginIdChanged(const Model *, QString); | 94 void playPluginIdChanged(const Model *, QString); |
96 void playPluginConfigurationChanged(const Model *, QString); | 95 void playPluginConfigurationChanged(const Model *, QString); |
97 | 96 |
98 protected: | 97 protected: |
99 ViewManager *m_viewManager; | |
100 size_t m_sourceSampleRate; | 98 size_t m_sourceSampleRate; |
101 size_t m_targetChannelCount; | 99 size_t m_targetChannelCount; |
102 | 100 |
103 struct NoteOff { | 101 struct NoteOff { |
104 | 102 |
118 typedef std::map<const Model *, NoteOffSet> NoteOffMap; | 116 typedef std::map<const Model *, NoteOffSet> NoteOffMap; |
119 | 117 |
120 QMutex m_mutex; | 118 QMutex m_mutex; |
121 PluginMap m_synthMap; | 119 PluginMap m_synthMap; |
122 NoteOffMap m_noteOffs; | 120 NoteOffMap m_noteOffs; |
123 QString m_sampleDir; | 121 static QString m_sampleDir; |
124 | 122 |
125 virtual RealTimePluginInstance *loadPluginFor(const Model *model); | 123 virtual RealTimePluginInstance *loadPluginFor(const Model *model); |
126 virtual RealTimePluginInstance *loadPlugin(QString id, QString program); | 124 virtual RealTimePluginInstance *loadPlugin(QString id, QString program); |
127 QString getSampleDir(); | 125 static QString getSampleDir(); |
128 void setSamplePath(RealTimePluginInstance *plugin); | 126 static QString getSamplePath(); |
127 static void setSamplePath(RealTimePluginInstance *plugin); | |
129 | 128 |
130 virtual size_t mixDenseTimeValueModel | 129 virtual size_t mixDenseTimeValueModel |
131 (DenseTimeValueModel *model, size_t startFrame, size_t frameCount, | 130 (DenseTimeValueModel *model, size_t startFrame, size_t frameCount, |
132 float **buffer, float gain, float pan, size_t fadeIn, size_t fadeOut); | 131 float **buffer, float gain, float pan, size_t fadeIn, size_t fadeOut); |
133 | 132 |