X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=linux%2F940ctl_ym2612.c;h=403cca2cd342438326d74694a296576edd9c6621;hb=2b90fc61e0907707c60bb01d97645b6afc22d4ae;hp=915ac0a513c2e67fc998a1088f7e1fb863a2dbc8;hpb=49fe50f04c9e6aab1cce54302bd4990a0471df00;p=libpicofe.git diff --git a/linux/940ctl_ym2612.c b/linux/940ctl_ym2612.c index 915ac0a..403cca2 100644 --- a/linux/940ctl_ym2612.c +++ b/linux/940ctl_ym2612.c @@ -13,7 +13,7 @@ #include "../gp2x/emu.h" #include "../gp2x/menu.h" #include "../gp2x/code940/940shared.h" -#include "../gp2x/helix/pub/mp3dec.h" +#include "../common/helix/pub/mp3dec.h" #include "../../Pico/PicoInt.h" @@ -24,7 +24,7 @@ YM2612 *ym2612_940 = &ym2612; // static _940_data_t shared_data_; static _940_ctl_t shared_ctl_; // static _940_data_t *shared_data = &shared_data_; -static _940_ctl_t *shared_ctl = &shared_ctl_; +_940_ctl_t *shared_ctl = &shared_ctl_; unsigned char *mp3_mem = 0; @@ -32,15 +32,6 @@ unsigned char *mp3_mem = 0; /***********************************************************/ -#define MAXOUT (+32767) -#define MINOUT (-32768) - -/* limitter */ -#define Limit(val, max,min) { \ - if ( val > max ) val = max; \ - else if ( val < min ) val = min; \ -} - int YM2612Write_940(unsigned int a, unsigned int v) { @@ -80,10 +71,18 @@ void YM2612PicoStateLoad_940(void) } -void YM2612Init_940(int baseclock, int rate) +void sharedmem_init(void) { mp3_mem = malloc(MP3_SIZE_MAX); +} + +void sharedmem_deinit(void) +{ + free(mp3_mem); +} +void YM2612Init_940(int baseclock, int rate) +{ YM2612Init_(baseclock, rate); } @@ -184,6 +183,12 @@ int YM2612UpdateOne_940(int *buffer, int length, int stereo, int is_buf_empty) } +void mp3_update(int *buffer, int length, int stereo) +{ + // nothing.. +} + + /***********************************************************/ void mp3_start_play(FILE *f, int pos) // pos is 0-1023 @@ -218,3 +223,4 @@ int mp3_get_offset(void) return 0; } +