X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=plugins%2Fdfsound%2Fexternals.h;h=e85c191bd40daade1ca6409808f5edfa17c01d17;hb=38b8a211aad8d2c485ccf0c0cbb58d965aac3483;hp=297c2c39c01478eab082fbc62379e205a8561379;hpb=0de2ae236e4f4cd7c9fb0ee648037f93753c02ff;p=pcsx_rearmed.git diff --git a/plugins/dfsound/externals.h b/plugins/dfsound/externals.h index 297c2c39..e85c191b 100644 --- a/plugins/dfsound/externals.h +++ b/plugins/dfsound/externals.h @@ -89,17 +89,6 @@ typedef struct /////////////////////////////////////////////////////////// -// Tmp Flags - -// used for debug channel muting -#define FLAG_MUTE 1 - -// used for simple interpolation -#define FLAG_IPOL0 2 -#define FLAG_IPOL1 4 - -/////////////////////////////////////////////////////////// - // MAIN CHANNEL STRUCT typedef struct { @@ -190,7 +179,7 @@ typedef union union { struct { int pos; - signed short val[4]; + int val[4]; } gauss; int simple[5]; // 28-32 } interp; @@ -204,11 +193,6 @@ typedef struct unsigned short spuStat; unsigned int spuAddr; - union { - unsigned char *spuMemC; - unsigned short *spuMem; - }; - unsigned char * pSpuIrq; unsigned int cycles_played; unsigned int cycles_dma_end; @@ -224,11 +208,34 @@ typedef struct unsigned int dwChannelsAudible; // not silent channels unsigned int dwChannelDead; // silent+not useful channels + unsigned int XARepeat; + unsigned int XALastVal; + + int iLeftXAVol; + int iRightXAVol; + + struct { // channel volume in the cd controller + unsigned char ll, lr, rl, rr; // see cdr.Attenuator* in cdrom.c + } cdv; // applied on spu side for easier emulation + + unsigned int last_keyon_cycles; + + union { + unsigned char *spuMemC; + unsigned short *spuMem; + }; + unsigned char * pSpuIrq; + unsigned char * pSpuBuffer; short * pS; - void (CALLBACK *irqCallback)(void); // func of main emu, called on spu irq - void (CALLBACK *cddavCallback)(short, short); + SPUCHAN * s_chan; + REVERBInfo * rvb; + + int * SSumLR; + + void (CALLBACK *irqCallback)(int); + //void (CALLBACK *cddavCallback)(short, short); void (CALLBACK *scheduleCallback)(unsigned int); const xa_decode_t * xapGlobal; @@ -242,19 +249,6 @@ typedef struct unsigned int * CDDAStart; unsigned int * CDDAEnd; - unsigned int XARepeat; - unsigned int XALastVal; - - int iLeftXAVol; - int iRightXAVol; - - SPUCHAN * s_chan; - REVERBInfo * rvb; - - // buffers - void * unused; - int * SSumLR; - unsigned short regArea[0x400]; sample_buf sb[MAXCHAN]; @@ -278,6 +272,7 @@ extern SPUInfo spu; void do_samples(unsigned int cycles_to, int do_sync); void schedule_next_irq(void); void check_irq_io(unsigned int addr); +void do_irq_io(int cycles_after); #define do_samples_if_needed(c, sync, samples) \ do { \ @@ -287,4 +282,7 @@ void check_irq_io(unsigned int addr); #endif +void FeedXA(const xa_decode_t *xap); +void FeedCDDA(unsigned char *pcm, int nBytes); + #endif /* __P_SOUND_EXTERNALS_H__ */