-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Expand file tree
/
Copy pathofxEmscriptenSoundStream.h
More file actions
43 lines (35 loc) · 971 Bytes
/
ofxEmscriptenSoundStream.h
File metadata and controls
43 lines (35 loc) · 971 Bytes
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
/*
* ofxEmscriptenSoundStream.h
*
* Created on: May 16, 2014
* Author: arturo
*/
#pragma once
#include "ofSoundBaseTypes.h"
#include "ofSoundBuffer.h"
class ofxEmscriptenSoundStream: public ofBaseSoundStream {
public:
ofxEmscriptenSoundStream();
~ofxEmscriptenSoundStream();
std::vector<ofSoundDevice> getDeviceList(ofSoundDevice::Api api) const;
bool setup(const ofSoundStreamSettings & settings);
void setInput(ofBaseSoundInput * soundInput);
void setOutput(ofBaseSoundOutput * soundOutput);
ofSoundDevice getInDevice() const;
ofSoundDevice getOutDevice() const;
void start();
void stop();
void close();
uint64_t getTickCount() const;
int getNumInputChannels() const;
int getNumOutputChannels() const;
int getSampleRate() const;
int getBufferSize() const;
ofSoundStreamSettings settings;
ofSoundBuffer inbuffer;
ofSoundBuffer outbuffer;
int audioProcessedCount;
private:
int context;
uint8_t wasmAudioWorkletStack[4096 * 4];
};