X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=plugins%2Fdfsound%2Fexternals.h;h=f3fbc678c94e64cd94e09477c98b3bea53ddd96f;hb=d358733b8461f6fa182b33d29f0676c2df505854;hp=b63ac3c4e38f7edca64f3697a08ac9e5fb5fc49e;hpb=4d66d894c6563cbfb78fe8ccc0b374809fc44b0d;p=pcsx_rearmed.git diff --git a/plugins/dfsound/externals.h b/plugins/dfsound/externals.h index b63ac3c4..f3fbc678 100644 --- a/plugins/dfsound/externals.h +++ b/plugins/dfsound/externals.h @@ -118,8 +118,14 @@ typedef struct unsigned int prevflags:3; // flags from previous block unsigned int bIgnoreLoop:1; // Ignore loop unsigned int bNewPitch:1; // pitch changed - int iLeftVolume; // left volume - int iRightVolume; // right volume + unsigned int bStarting:1; // starting after keyon + union { + struct { + int iLeftVolume; // left volume + int iRightVolume; // right volume + }; + int iVolume[2]; + }; ADSRInfoEx ADSRX; int iRawPitch; // raw pitch (0...3fff) } SPUCHAN; @@ -192,6 +198,7 @@ typedef struct unsigned char * pSpuIrq; unsigned int cycles_played; + unsigned int cycles_dma_end; int decode_pos; int decode_dirty_ch; unsigned int bSpuInit:1; @@ -235,7 +242,6 @@ typedef struct int * SB; int * SSumLR; - int pad[29]; unsigned short regArea[0x400]; } SPUInfo; @@ -256,9 +262,9 @@ void do_samples(unsigned int cycles_to, int do_sync); void schedule_next_irq(void); void check_irq_io(unsigned int addr); -#define do_samples_if_needed(c, sync) \ +#define do_samples_if_needed(c, sync, samples) \ do { \ - if (sync || (int)((c) - spu.cycles_played) >= 16 * 768) \ + if (sync || (int)((c) - spu.cycles_played) >= (samples) * 768) \ do_samples(c, sync); \ } while (0)