X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=plugins%2Fdfsound%2Fexternals.h;h=5ec941525c234a4963471cee79f11853ac1c2092;hp=e85c191bd40daade1ca6409808f5edfa17c01d17;hb=HEAD;hpb=38b8a211aad8d2c485ccf0c0cbb58d965aac3483 diff --git a/plugins/dfsound/externals.h b/plugins/dfsound/externals.h index e85c191b..6dbbac67 100644 --- a/plugins/dfsound/externals.h +++ b/plugins/dfsound/externals.h @@ -58,7 +58,7 @@ #define MAXCHAN 24 // note: must be even due to the way reverb works now -#define NSSIZE ((44100 / 50 + 16) & ~1) +#define NSSIZE ((44100 / 50 + 32) & ~1) /////////////////////////////////////////////////////////// // struct defines @@ -214,6 +214,7 @@ typedef struct int iLeftXAVol; int iRightXAVol; + int cdClearSamples; // extra samples to clear the capture buffers 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 @@ -253,13 +254,17 @@ typedef struct sample_buf sb[MAXCHAN]; int interpolation; - sample_buf sb_thread[MAXCHAN]; + +#if P_HAVE_PTHREAD || defined(WANT_THREAD_CODE) + sample_buf * sb_thread; + sample_buf sb_thread_[MAXCHAN]; +#endif } SPUInfo; #define regAreaGet(offset) \ - spu.regArea[((offset) - 0xc00)>>1] + spu.regArea[((offset) - 0xc00) >> 1] #define regAreaGetCh(ch, offset) \ - spu.regArea[((ch<<4)|(offset))>>1] + spu.regArea[(((ch) << 4) | (offset)) >> 1] /////////////////////////////////////////////////////////// // SPU.C globals @@ -269,15 +274,15 @@ typedef struct extern SPUInfo spu; -void do_samples(unsigned int cycles_to, int do_sync); +void do_samples(unsigned int cycles_to, int force_no_thread); 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) \ +#define do_samples_if_needed(c, no_thread, samples) \ do { \ - if (sync || (int)((c) - spu.cycles_played) >= (samples) * 768) \ - do_samples(c, sync); \ + if ((no_thread) || (int)((c) - spu.cycles_played) >= (samples) * 768) \ + do_samples(c, no_thread); \ } while (0) #endif