Changeset 2472:39fc3e4ab091 in roaraudio
- Timestamp:
- 08/22/09 04:16:33 (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/ssynth.c
r2471 r2472 114 114 return 0; 115 115 116 ROAR_DBG("ssynth_update(void) = ?"); 117 116 118 if ( streams_get(g_ssynth.stream, &ss) == -1 ) { 117 119 return -1; … … 123 125 124 126 needlen = ROAR_OUTPUT_CALC_OUTBUFSIZE(&(s->info)); 127 128 ROAR_DBG("ssynth_update(void): needlen=%lu", (unsigned long)needlen); 125 129 126 130 for (i = 0; i < SSYNTH_NOTES_MAX; i++) { 127 131 if ( g_ssynth.notes[i].stage != SSYNTH_STAGE_UNUSED ) { 132 ROAR_DBG("ssynth_update(void): used note slot: %i", i); 128 133 if ( g_ssynth.notes[i].buf == NULL ) { 129 134 if ( roar_buffer_new(&buf, needlen) == -1 ) … … 153 158 } 154 159 160 ROAR_DBG("ssynth_update(void): found streams: %i", curin); 161 155 162 if ( curin > 0 ) { 156 163 if ( roar_buffer_new(&outbuf, needlen) == -1 ) … … 173 180 } 174 181 182 ROAR_DBG("ssynth_update(void) = 0"); 175 183 return 0; 176 184 } … … 179 187 int ssynth_note_new(struct roar_note_octave * note, char vv) { 180 188 int i; 189 190 ROAR_DBG("ssynth_note_new(note=%p, vv=%i) = ?", note, vv); 181 191 182 192 for (i = 0; i < SSYNTH_NOTES_MAX; i++) { … … 187 197 roar_synth_init(&(g_ssynth.notes[i].synth), &(g_ssynth.notes[i].note), g_sa->rate); 188 198 ssynth_note_set_stage(i, SSYNTH_STAGE_KEYSTROKE); 199 ROAR_DBG("ssynth_note_new(note=%p, vv=%i) = %i", note, vv, i); 189 200 return i; 190 201 } 191 202 } 192 203 204 ROAR_DBG("ssynth_note_new(note=%p, vv=%i) = -1", note, vv); 193 205 return -1; 194 206 } … … 250 262 251 263 int ssynth_note_on (struct roar_note_octave * note, char vv) { 264 ROAR_DBG("ssynth_note_on(note=%p, vv=%i) = ?", note, vv); 252 265 return ssynth_note_new(note, vv); 253 266 } … … 256 269 int id; 257 270 271 ROAR_DBG("ssynth_note_off(note=%p, vv=%i) = ?", note, vv); 272 258 273 if ( (id = ssynth_note_find(note)) == -1 ) 259 274 return -1; … … 267 282 if ( !ssynth_conf.enable ) 268 283 return -1; 284 285 ROAR_DBG("ssynth_eval_message(mes=%p) = ?", mes); 269 286 270 287 switch (mes->type) { … … 273 290 break; 274 291 case MIDI_TYPE_NOTE_ON: 275 return ssynth_note_o ff(&(mes->d.note), mes->vv);292 return ssynth_note_on(&(mes->d.note), mes->vv); 276 293 break; 277 294 default: … … 280 297 } 281 298 299 ROAR_DBG("ssynth_eval_message(mes=%p) = -1", mes); 282 300 return -1; 283 301 }
Note: See TracChangeset
for help on using the changeset viewer.