mirror of
https://github.com/vsariola/sointu.git
synced 2025-09-10 23:35:41 -04:00
code/text formatting and cleaning up whitespace
This commit is contained in:
parent
f35f948118
commit
00850c8001
@ -4,27 +4,28 @@
|
||||
#include <sointu.h>
|
||||
#include "test_render_samples.h"
|
||||
|
||||
void SU_CALLCONV su_render_song(float* buffer) {
|
||||
Synth* synth;
|
||||
const unsigned char commands[] = { SU_ENVELOPE_ID, // MONO
|
||||
SU_ENVELOPE_ID, // MONO
|
||||
SU_OUT_ID + 1, // STEREO
|
||||
SU_ADVANCE_ID };// MONO
|
||||
const unsigned char values[] = { 64, 64, 64, 80, 128, // envelope 1
|
||||
95, 64, 64, 80, 128, // envelope 2
|
||||
128};
|
||||
void SU_CALLCONV su_render_song(float *buffer)
|
||||
{
|
||||
Synth *synth;
|
||||
const unsigned char commands[] = {SU_ENVELOPE_ID, // MONO
|
||||
SU_ENVELOPE_ID, // MONO
|
||||
SU_OUT_ID + 1, // STEREO
|
||||
SU_ADVANCE_ID}; // MONO
|
||||
const unsigned char values[] = {64, 64, 64, 80, 128, // envelope 1
|
||||
95, 64, 64, 80, 128, // envelope 2
|
||||
128};
|
||||
int retval;
|
||||
int samples;
|
||||
int time;
|
||||
// initialize Synth
|
||||
synth = (Synth*)malloc(sizeof(Synth));
|
||||
synth = (Synth *)malloc(sizeof(Synth));
|
||||
memset(synth, 0, sizeof(Synth));
|
||||
memcpy(synth->Commands, commands, sizeof(commands));
|
||||
memcpy(synth->Values, values, sizeof(values));
|
||||
synth->NumVoices = 1;
|
||||
synth->Polyphony = 0;
|
||||
synth->RandSeed = 1;
|
||||
// triger first voice
|
||||
// triger first voice
|
||||
synth->SynthWrk.Voices[0].Note = 64;
|
||||
synth->SynthWrk.Voices[0].Sustain = 1;
|
||||
samples = SU_LENGTH_IN_SAMPLES / 2;
|
||||
|
Reference in New Issue
Block a user