Changeset 369:01c814f9b114 in roaraudio
- Timestamp:
- 08/03/08 14:29:09 (16 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroardsp/midi.c
r367 r369 89 89 float step = M_PI*2*note->freq/rate; 90 90 int16_t s; 91 float (*op)(float x) = NULL; 91 92 92 93 /* … … 97 98 */ 98 99 100 if ( type == ROAR_MIDI_TYPE_SINE ) { 101 op = sinf; 102 } else { 103 return -1; 104 } 105 106 if ( op == NULL ) 107 return -1; 108 99 109 for (ct = 0, i = 0; ct <= t; ct += step, i += channels) { 100 s = 32767* sin(ct);110 s = 32767*op(ct); 101 111 102 112 for (c = 0; c < channels; c++)
Note: See TracChangeset
for help on using the changeset viewer.