blob: 17770a7300862e2856f9ee08681b92933ec17273 (
plain)
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
|
#pragma once
#include "dct.h"
#define MAX_SPECTROGRAMS 16
#define MAX_VOICES 16
struct Spectrogram {
float* spectral_data_a;
float* spectral_data_b;
int num_frames;
};
void synth_init();
void synth_shutdown();
int synth_register_spectrogram(const Spectrogram* spec);
void synth_unregister_spectrogram(int spectrogram_id);
float* synth_begin_update(int spectrogram_id);
void synth_commit_update(int spectrogram_id);
void synth_trigger_voice(int spectrogram_id, float volume, float pan);
void synth_render(float* output_buffer, int num_frames);
int synth_get_active_voice_count();
|