Changeset 2426:122c29dbcd87 in roaraudio for include
- Timestamp:
- 08/19/09 05:12:09 (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
include/libroardsp/synth.h
r2425 r2426 38 38 #include "libroardsp.h" 39 39 40 #define ROAR_SYNTH_FUNC_TYPE(name) float (*name)(float t, struct roar_synth_state * state) 41 #define ROAR_SYNTH_FUNC_CAST(name) ((ROAR_SYNTH_FUNC_TYPE()) name) 42 43 // SYNF -> Synthesis Function 44 #define ROAR_SYNTH_SYNF_SINE ROAR_SYNTH_FUNC_CAST(sinf) 45 46 struct roar_synth_state { 47 int rate; 48 struct roar_note_octave * note; 49 ROAR_SYNTH_FUNC_TYPE(func); 50 size_t pcmoffset; 51 }; 52 53 int roar_synth_init(struct roar_synth_state * state, struct roar_note_octave * note, int rate); 54 int roar_synth_set_offset(struct roar_synth_state * state, size_t offset); 55 int roar_synth_set_func (struct roar_synth_state * state, ROAR_SYNTH_FUNC_TYPE(func)); 56 57 int roar_synth_pcmout_i16n(struct roar_synth_state * state, int16_t * out, size_t frames, int channels); 58 int roar_synth_pcmout_i161(struct roar_synth_state * state, int16_t * out, size_t frames); 59 40 60 #endif 41 61
Note: See TracChangeset
for help on using the changeset viewer.