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

Sound support for Javascript (untested).

This commit is contained in:
Juan Linietsky
2017-10-26 22:34:49 -03:00
parent b1b11ea411
commit b8ac700046
2 changed files with 92 additions and 3 deletions

View File

@@ -35,7 +35,23 @@
#include "os/mutex.h"
class AudioDriverJavaScript : public AudioDriver {
enum {
INTERNAL_BUFFER_SIZE = 4096,
STREAM_SCALE_BITS = 12
};
int mix_rate;
float *internal_buffer;
int internal_buffer_channels;
int internal_buffer_size;
int32_t *stream_buffer;
public:
void mix_to_js(int p_frames);
static AudioDriverJavaScript *singleton_js;
virtual const char *get_name() const;
virtual Error init();