Data Fields

noise_part_s Struct Reference

Data Fields

uint8_t * values
 pointer to values of sample
uint16_t duration
 duration for playing
uint8_t idx
 index to next value
uint8_t num_values
 number of values in list
struct noise_part_snext
 pointer to next sample to play
volatile uint8_t * pdone
struct {
   uint8_t   malloced_struct:1
 GC: free() this struct.
   uint8_t   malloced_values:1
 GC: free() values list.
flags

Detailed Description

We build a singly-linked list of samples to play. Each sample has a pointer to a list of values to output to the PWM generator (in a circular way) and a duration.

When the sample has used up its timeslice (as measured by duration), the next sample will get started and the current sample will be put in a list for later garbage collection (we don't want to do the free() in the ISR).


The documentation for this struct was generated from the following file: