diff options
Diffstat (limited to 'src/audio/synth.cpp')
| -rw-r--r-- | src/audio/synth.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/audio/synth.cpp b/src/audio/synth.cpp index f009876..3c20b0b 100644 --- a/src/audio/synth.cpp +++ b/src/audio/synth.cpp @@ -155,3 +155,13 @@ void synth_render(float* output_buffer, int num_frames) { output_buffer[i * 2 + 1] = right_sample; } } + +int synth_get_active_voice_count() { + int count = 0; + for (int i = 0; i < MAX_VOICES; ++i) { + if (g_voices[i].active) { + count++; + } + } + return count; +} |
