comparison audioio/AudioGenerator.cpp @ 323:5c69d40a0e30 tonioni

Added alternate waveforms for sonification. Created parameter m_wavetype in ContinuousSynth.
author Rachel Bittner <rmb456@nyu.edu>
date Sun, 12 Jan 2014 05:12:08 -0500
parents 65b75e23bbd5
children 0e4332efcc7d
comparison
equal deleted inserted replaced
319:ccd3c927638b 323:5c69d40a0e30
46 //#define DEBUG_AUDIO_GENERATOR 1 46 //#define DEBUG_AUDIO_GENERATOR 1
47 47
48 AudioGenerator::AudioGenerator() : 48 AudioGenerator::AudioGenerator() :
49 m_sourceSampleRate(0), 49 m_sourceSampleRate(0),
50 m_targetChannelCount(1), 50 m_targetChannelCount(1),
51 m_waveType(0),
51 m_soloing(false) 52 m_soloing(false)
52 { 53 {
53 initialiseSampleDir(); 54 initialiseSampleDir();
54 55
55 connect(PlayParameterRepository::getInstance(), 56 connect(PlayParameterRepository::getInstance(),
224 const Playable *playable = model; 225 const Playable *playable = model;
225 if (!playable || !playable->canPlay()) return 0; 226 if (!playable || !playable->canPlay()) return 0;
226 227
227 ContinuousSynth *synth = new ContinuousSynth(m_targetChannelCount, 228 ContinuousSynth *synth = new ContinuousSynth(m_targetChannelCount,
228 m_sourceSampleRate, 229 m_sourceSampleRate,
229 m_processingBlockSize); 230 m_processingBlockSize,
231 m_waveType);
230 232
231 std::cerr << "AudioGenerator::makeSynthFor(" << model << "): created synth" << std::endl; 233 std::cerr << "AudioGenerator::makeSynthFor(" << model << "): created synth" << std::endl;
232 234
233 return synth; 235 return synth;
234 } 236 }