#ifndef PROTOTYPE1_SRC_L2_LIZA_INSTRUMENT_H
#define PROTOTYPE1_SRC_L2_LIZA_INSTRUMENT_H

#include "playing_sound_loop.h"

// todo: rewrite with the help of l1_5

typedef struct {
    /* self (takes ownership) */
    void (*drop)(void*);
    /* self, frequency, time, returns: new sound box */
    BoxLizaSound (*ding)(const void*, double, double);
    // todo: request options for instrument
} LizaInstrument_Table;

typedef struct {
    const void* r;
    const LizaInstrument_Table* t;
} RefLizaInstrument;

typedef struct {
    void* r;
    const LizaInstrument_Table* t;
} MutLizaInstrument;

typedef struct {
    void* m;
    const LizaInstrument_Table* t;
} BoxLizaInstrument;

void BoxLizaInstrument_drop(BoxLizaInstrument self) {
    self.t->drop(self.m);
}

#include "../../../gen/l1/eve/liza/VecBoxLizaInstrument.h"


#endif