cdrom: change pause timing again
[pcsx_rearmed.git] / plugins / dfsound / externals.h
index d752acf..6dbbac6 100644 (file)
@@ -58,7 +58,7 @@
 #define MAXCHAN     24\r
 \r
 // note: must be even due to the way reverb works now\r
-#define NSSIZE ((44100 / 50 + 16) & ~1)\r
+#define NSSIZE ((44100 / 50 + 32) & ~1)\r
 \r
 ///////////////////////////////////////////////////////////\r
 // struct defines\r
@@ -89,17 +89,6 @@ typedef struct
               \r
 ///////////////////////////////////////////////////////////\r
 \r
-// Tmp Flags\r
-\r
-// used for debug channel muting\r
-#define FLAG_MUTE  1\r
-\r
-// used for simple interpolation\r
-#define FLAG_IPOL0 2\r
-#define FLAG_IPOL1 4\r
-\r
-///////////////////////////////////////////////////////////\r
-\r
 // MAIN CHANNEL STRUCT\r
 typedef struct\r
 {\r
@@ -225,6 +214,11 @@ typedef struct
  int             iLeftXAVol;\r
  int             iRightXAVol;\r
 \r
+ int             cdClearSamples;       // extra samples to clear the capture buffers\r
+ struct {                              // channel volume in the cd controller\r
+  unsigned char  ll, lr, rl, rr;       // see cdr.Attenuator* in cdrom.c\r
+ } cdv;                                // applied on spu side for easier emulation\r
+\r
  unsigned int    last_keyon_cycles;\r
 \r
  union {\r
@@ -241,7 +235,7 @@ typedef struct
 \r
  int           * SSumLR;\r
 \r
- void (CALLBACK *irqCallback)(void);   // func of main emu, called on spu irq\r
+ void (CALLBACK *irqCallback)(int);\r
  //void (CALLBACK *cddavCallback)(short, short);\r
  void (CALLBACK *scheduleCallback)(unsigned int);\r
 \r
@@ -260,13 +254,17 @@ typedef struct
 \r
  sample_buf      sb[MAXCHAN];\r
  int             interpolation;\r
- sample_buf      sb_thread[MAXCHAN];\r
+\r
+#if P_HAVE_PTHREAD || defined(WANT_THREAD_CODE)\r
+ sample_buf    * sb_thread;\r
+ sample_buf      sb_thread_[MAXCHAN];\r
+#endif\r
 } SPUInfo;\r
 \r
 #define regAreaGet(offset) \\r
-  spu.regArea[((offset) - 0xc00)>>1]\r
+  spu.regArea[((offset) - 0xc00) >> 1]\r
 #define regAreaGetCh(ch, offset) \\r
-  spu.regArea[((ch<<4)|(offset))>>1]\r
+  spu.regArea[(((ch) << 4) | (offset)) >> 1]\r
 \r
 ///////////////////////////////////////////////////////////\r
 // SPU.C globals\r
@@ -276,16 +274,20 @@ typedef struct
 \r
 extern SPUInfo spu;\r
 \r
-void do_samples(unsigned int cycles_to, int do_sync);\r
+void do_samples(unsigned int cycles_to, int force_no_thread);\r
 void schedule_next_irq(void);\r
 void check_irq_io(unsigned int addr);\r
+void do_irq_io(int cycles_after);\r
 \r
-#define do_samples_if_needed(c, sync, samples) \\r
+#define do_samples_if_needed(c, no_thread, samples) \\r
  do { \\r
-  if (sync || (int)((c) - spu.cycles_played) >= (samples) * 768) \\r
-   do_samples(c, sync); \\r
+  if ((no_thread) || (int)((c) - spu.cycles_played) >= (samples) * 768) \\r
+   do_samples(c, no_thread); \\r
  } while (0)\r
 \r
 #endif\r
 \r
+void FeedXA(const xa_decode_t *xap);\r
+void FeedCDDA(unsigned char *pcm, int nBytes);\r
+\r
 #endif /* __P_SOUND_EXTERNALS_H__ */\r