| 123456789101112131415161718192021222324252627282930313233343536 |
- #ifndef MD_TYPES_H
- #define MD_TYPES_H
- #include <stdint.h>
- #include "yuzuparse.h"
- #include "orangetree.h"
- typedef struct {
- float left_tone;
- float right_tone;
- float left_amplitude;
- float right_amplitude;
- float (*tone_generator)(float, float);
- uint32_t current_sample;
- uint32_t sample_count;
- uint32_t sample_rate;
- float duration;
- float value; // a value that is passed into the tone generator. could be HZ for example
- } pa_tone_callback_data;
- typedef struct {
- void* OT_next;
- void* OT_prev;
- pa_tone_callback_data* tone_data;
- pa_callback_data* sound_data;
- unsigned char is_started;
- double sample_rate;
- double start_time; // seconds since epoch until sound will start
- } MD_sound;
- typedef struct {
- unsigned char is_empty;
- MD_sound* sounds;
- } MD_queue;
- #endif
|