comparison ym2612.h @ 1551:ce1f93be0104

Small cleanup to audio interface between emulation code and renderer backend
author Michael Pavone <pavone@retrodev.com>
date Wed, 28 Mar 2018 23:36:08 -0700
parents 4e5797b3935a
children 6ce36c3f250b
comparison
equal deleted inserted replaced
1550:b525491b4e5b 1551:ce1f93be0104
7 #define YM2612_H_ 7 #define YM2612_H_
8 8
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <stdio.h> 10 #include <stdio.h>
11 #include "serialize.h" 11 #include "serialize.h"
12 #include "render.h"
12 13
13 #define NUM_PART_REGS (0xB7-0x30) 14 #define NUM_PART_REGS (0xB7-0x30)
14 #define NUM_CHANNELS 6 15 #define NUM_CHANNELS 6
15 #define NUM_OPERATORS (4*NUM_CHANNELS) 16 #define NUM_OPERATORS (4*NUM_CHANNELS)
16 17
61 #define YM_PART1_REGS (YM_REG_END-YM_PART1_START) 62 #define YM_PART1_REGS (YM_REG_END-YM_PART1_START)
62 #define YM_PART2_REGS (YM_REG_END-YM_PART2_START) 63 #define YM_PART2_REGS (YM_REG_END-YM_PART2_START)
63 64
64 typedef struct { 65 typedef struct {
65 int16_t *audio_buffer; 66 int16_t *audio_buffer;
66 int16_t *back_buffer; 67 audio_source *audio;
67 uint64_t buffer_fraction; 68 uint64_t buffer_fraction;
68 uint64_t buffer_inc; 69 uint64_t buffer_inc;
69 uint32_t clock_inc; 70 uint32_t clock_inc;
70 uint32_t buffer_pos; 71 uint32_t buffer_pos;
71 uint32_t sample_rate; 72 uint32_t sample_rate;