Added mixer and sound (c side)

This commit is contained in:
rnlf
2017-01-22 01:01:24 +01:00
parent d78f203674
commit 5f6daa497f
6 changed files with 195 additions and 19 deletions

15
src/sound.c Normal file
View File

@@ -0,0 +1,15 @@
#include <stdint.h>
#include "sound.h"
#include "lib/dmt/dmt.h"
int sound_init(sound_t *self, int samples) {
self->sampleCount = samples;
self->samples = (int16_t*)dmt_malloc(samples * sizeof(int16_t));
return 0;
}
void sound_deinit(sound_t *self) {
dmt_free(self->samples);
}