summaryrefslogtreecommitdiffstats
path: root/src/synth_engine_v2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/synth_engine_v2.c')
-rw-r--r--src/synth_engine_v2.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/synth_engine_v2.c b/src/synth_engine_v2.c
index ad1be72..d4b7509 100644
--- a/src/synth_engine_v2.c
+++ b/src/synth_engine_v2.c
@@ -349,11 +349,11 @@ get_frame(void *outputBuffer, synth_t *synth, int frame)
*out++ = sample;
*out++ = sample;
- if (sample > 1.0f || sample < -1.0f)
- printf("%f\n", sample);
- if (prev != 0.0f && fabs(prev - sample) > 0.5f) {
- printf("%.2f --> %.2f\n", prev, sample);
- }
+ /* if (sample > 1.0f || sample < -1.0f) */
+ /* printf("%f\n", sample); */
+ /* if (prev != 0.0f && fabs(prev - sample) > 0.5f) { */
+ /* printf("%.2f --> %.2f\n", prev, sample); */
+ /* } */
prev = sample;
// move time
@@ -564,16 +564,18 @@ init_synth(void)
synth->wvt_pos = 0;
-
synth->sound_active = 0;
- synth->soundcard_id = get_soundcard_id("default");
- init_sound(synth, sound_gen, synth->soundcard_id);
+ strcpy(synth->soundcard.name, "default");
+ init_sound(synth, sound_gen, synth->soundcard.name);
synth->midi = (midi_t *)malloc(sizeof(midi_t));
synth->midi_device_id = get_midi_device_id("Midi Through Port-0");
init_midi(synth->midi, synth);
+ synth->gui.screen = SCREEN_MAIN;
+ synth->gui.audiomidi_initialized = 0;
+
return synth;
}
@@ -604,8 +606,7 @@ void
change_soundcard(synth_t *synth)
{
destroy_sound(synth);
- synth->sound_active = 0;
- init_sound(synth, sound_gen, synth->soundcard_id);
+ init_sound(synth, sound_gen, synth->soundcard.name);
}
void