1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Detect channel count, mix rate, and buffer length in HTML5 audio driver

Refactor WebAudio driver.
This commit is contained in:
Leon Krause
2017-11-05 23:48:13 +01:00
parent f2d669f5d3
commit 8d3ca2c137
2 changed files with 88 additions and 74 deletions

View File

@@ -35,18 +35,11 @@
class AudioDriverJavaScript : public AudioDriver {
enum {
INTERNAL_BUFFER_SIZE = 4096,
};
int mix_rate;
float *internal_buffer;
int internal_buffer_channels;
int32_t *stream_buffer;
public:
void mix_to_js(int p_frames);
static AudioDriverJavaScript *singleton_js;
void mix_to_js();
static AudioDriverJavaScript *singleton;
virtual const char *get_name() const;