cc68a136 |
1 | #include "../../Pico/sound/ym2612.h"\r |
2 | \r |
3 | enum _940_job_t {\r |
4 | JOB940_YM2612INIT = 1,\r |
5 | JOB940_YM2612RESETCHIP,\r |
6 | JOB940_YM2612UPDATEONE,\r |
7 | JOB940_PICOSTATELOAD,\r |
8 | JOB940_NUMJOBS\r |
9 | };\r |
10 | \r |
b837b69b |
11 | #define MAX_940JOBS 2\r |
cc68a136 |
12 | \r |
13 | typedef struct\r |
14 | {\r |
15 | YM2612 ym2612; /* current state of the emulated YM2612 */\r |
b837b69b |
16 | int mix_buffer[44100/50*2]; /* this is where the YM2612 samples will be mixed to */\r |
17 | short mp3_buffer[2][1152*2]; /* buffer for mp3 decoder's output */\r |
cc68a136 |
18 | } _940_data_t;\r |
19 | \r |
20 | \r |
21 | typedef struct\r |
22 | {\r |
b837b69b |
23 | int jobs[MAX_940JOBS]; /* jobs for second core */\r |
cc68a136 |
24 | int busy; /* busy status of the 940 core */\r |
25 | int length; /* number of samples to mix (882 max) */\r |
26 | int stereo; /* mix samples as stereo, doubles sample count automatically */\r |
27 | int baseclock; /* ym2612 settings */\r |
28 | int rate;\r |
29 | int writebuffsel; /* which write buffer to use (from 940 side) */\r |
b837b69b |
30 | UINT16 writebuff0[2048]; /* list of writes to ym2612, 1024 for savestates, 1024 extra */\r |
cc68a136 |
31 | UINT16 writebuff1[2048];\r |
32 | int vstarts[8]; /* debug: number of starts from each of 8 vectors */\r |
33 | int loopc; /* debug: main loop counter */\r |
34 | int waitc; /* debug: wait loop counter */\r |
35 | } _940_ctl_t;\r |