Refactored sound code - slight speedup.

This commit is contained in:
TomW 2016-02-10 20:49:28 +00:00
commit 3a57341837
33 changed files with 706 additions and 535 deletions

View file

@ -1,3 +1,5 @@
#include "timer.h"
typedef struct ad1848_t
{
int index;
@ -10,12 +12,17 @@ typedef struct ad1848_t
int count;
int16_t out_l, out_r;
int interp_count, inc;
int enable;
int irq, dma;
int freq;
int timer_count, timer_latch;
int16_t buffer[SOUNDBUFLEN * 2];
int pos;
} ad1848_t;
void ad1848_setirq(ad1848_t *ad1848, int irq);
@ -24,4 +31,5 @@ void ad1848_setdma(ad1848_t *ad1848, int dma);
uint8_t ad1848_read(uint16_t addr, void *p);
void ad1848_write(uint16_t addr, uint8_t val, void *p);
void ad1848_poll(void *p, int16_t *l, int16_t *r);
void ad1848_update(ad1848_t *ad1848);
void ad1848_speed_changed(ad1848_t *ad1848);