svapp  1.9
ContinuousSynth.h
Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
00002 
00003 /*
00004     Sonic Visualiser
00005     An audio file viewer and annotation editor.
00006     Centre for Digital Music, Queen Mary, University of London.
00007     
00008     This program is free software; you can redistribute it and/or
00009     modify it under the terms of the GNU General Public License as
00010     published by the Free Software Foundation; either version 2 of the
00011     License, or (at your option) any later version.  See the file
00012     COPYING included with this distribution for more information.
00013 */
00014 
00015 #ifndef CONTINUOUS_SYNTH_H
00016 #define CONTINUOUS_SYNTH_H
00017 
00024 class ContinuousSynth
00025 {
00026 public:
00027     ContinuousSynth(int channels, int sampleRate, int blockSize, int waveType);
00028     ~ContinuousSynth();
00029     
00030     void setChannelCount(int channels);
00031 
00032     void reset();
00033 
00047     void mix(float **toBuffers,
00048          float gain,
00049          float pan,
00050          float f0);
00051 
00052 private:
00053     int m_channels;
00054     int m_sampleRate;
00055     int m_blockSize;
00056 
00057     double m_prevF0;
00058     double m_phase;
00059 
00060     int m_wavetype;
00061 };
00062 
00063 #endif