Commit 87c9c0f3 authored by Jacob Vosmaer's avatar Jacob Vosmaer

Move poly1 voice assigner out of voice.c

parent 1fd8ee19
PRG = crowbx
OBJ = crowbx.o midi.o dac.o voice.o uart.o gate.o poly.o mono.o list.o vibrato.o poly2.o
OBJ = crowbx.o midi.o dac.o uart.o gate.o poly.o mono.o list.o vibrato.o poly2.o poly_voice.o
MCU_TARGET = atmega328p
#MCU_TARGET = at90s2313
#MCU_TARGET = at90s2333
......
......@@ -2,6 +2,7 @@
#include "poly.h"
#include "gate.h"
#include "voice.h"
#include "poly_voice.h"
#include "vibrato.h"
#include "midi.h"
......
#include "voice.h"
#include "poly_voice.h"
#include "list.h"
#include "voice.h"
// The voice assigner moves voices between the 'avail' (available) queue
// and the 'playing' list. The 'avail' data structure is a queue to get a
......
#ifndef _poly_voice_h
#define _poly_voice_h
#include <stdint.h>
void voice_init(void);
// voice_acquire returns a voice number for playing a new note
uint8_t voice_acquire();
// voice_release releases a voice, if playing. If v is not playing this is a no-op.
void voice_release(uint8_t v);
#endif
#ifndef voice_h
#define voice_h
#include <stdint.h>
#ifndef _voice_h
#define _voice_h
enum _voices {
VOICE1,
......@@ -13,12 +11,4 @@ enum _voices {
#define for_each_voice(var) for (uint8_t var = 0; var < NUM_VOICES; var++)
void voice_init(void);
// voice_acquire returns a voice number for playing a new note
uint8_t voice_acquire();
// voice_release releases a voice, if playing. If v is not playing this is a no-op.
void voice_release(uint8_t v);
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment