-
Notifications
You must be signed in to change notification settings - Fork 0
/
RoomGen.h
44 lines (37 loc) · 1.06 KB
/
RoomGen.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
//
// Room.h
// SqueakEngine
//
// Created by Ethan Geller on 11/12/14.
// Copyright (c) 2014 Ethan Geller. All rights reserved.
//
#ifndef __SqueakEngine__Room__
#define __SqueakEngine__Room__
#include <stdio.h>
#include <vector>
#include <string>
using namespace std;
#include "AudioGen.h"
#include "AudioFileHandler.h"
#include "Convoluter.h"
//ROOM GEN: Impulse creator
class RoomGen : public AudioGen {
//impulse in frequency samples
SAMPLE* impulse;
AudioFileHandler filer;
Convoluter convolver;
int size, srate, channels, playhead;
bool alreadyConvolved;
public:
typedef AudioGen super;
//MARK: init functions
RoomGen(string impulse_fpath = "sound/singles/squeak_3.wav" /*Vector3D c*/);
RoomGen(string impulse_fpath, vector<AudioGen*> sourceList);
void rewind();
void prepareConvolvedAudio();
SAMPLE* getSoundInRoom(SAMPLE* s, int sSize, int *tSize);
bool synthesize2(float *input, float *output, int numframes);
float* getImpulse();
int getSize();
};
#endif /* defined(__SqueakEngine__Room__) */