Mercurial > hg > svapp
diff audioio/ClipMixer.h @ 308:289d65722123 tonioni
More work on mixing and file i/o for sample stuff
author | Chris Cannam |
---|---|
date | Tue, 07 Jan 2014 15:50:04 +0000 |
parents | 9716c75499ef |
children | 8c59cc68eabd |
line wrap: on
line diff
--- a/audioio/ClipMixer.h Tue Jan 07 13:10:35 2014 +0000 +++ b/audioio/ClipMixer.h Tue Jan 07 15:50:04 2014 +0000 @@ -30,13 +30,16 @@ ClipMixer(int channels, int sampleRate, int blockSize); ~ClipMixer(); + void setChannelCount(int channels); + bool loadClipData(QString clipFilePath, float clipF0); + void reset(); // discarding any playing notes + //!!! what can we find in common with the NoteData type and //!!! AudioGenerator's NoteOff? struct NoteStart { - int id; // unique to match note end int frameOffset; // in current processing block float frequency; // Hz float level; // volume in range (0,1] @@ -44,11 +47,12 @@ }; struct NoteEnd { - int id; // matching note start + float frequency; // matching note start int frameOffset; // in current processing block }; void mix(float **toBuffers, + float gain, std::vector<NoteStart> newNotes, std::vector<NoteEnd> endingNotes);