--- ref2/plugins/dfsound/cfg.h 2008-03-22 14:46:36.000000000 +0100 +++ ref2/plugins/dfsound/cfg.h 2008-03-22 12:57:58.000000000 +0100 @@ -1,36 +1,30 @@ -/*************************************************************************** - cfg.h - description - ------------------- - begin : Wed May 15 2002 - copyright : (C) 2002 by Pete Bernert - email : BlackDove@addcom.de - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. See also the license.txt file for * - * additional informations. * - * * - ***************************************************************************/ - -//*************************************************************************// -// History of changes: -// -// 2002/05/15 - Pete -// - generic cleanup for the Peops release -// -//*************************************************************************// +/*************************************************************************** + cfg.h - description + ------------------- + begin : Wed May 15 2002 + copyright : (C) 2002 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ -void ReadConfig(void); +//*************************************************************************// +// History of changes: +// +// 2002/05/15 - Pete +// - generic cleanup for the Peops release +// +//*************************************************************************// -#ifdef _WINDOWS -BOOL CALLBACK AboutDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam); -BOOL CALLBACK DSoundDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam); -#else +void ReadConfig(void); void StartCfgTool(char * pCmdLine); -#endif + --- ref2/plugins/dfsound/debug.h 2008-03-22 14:46:36.000000000 +0100 +++ ref2/plugins/dfsound/debug.h 2008-03-22 12:56:12.000000000 +0100 @@ -24,6 +24,3 @@ // //*************************************************************************// -#ifdef _WINDOWS -BOOL CALLBACK DebugDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam); -#endif --- ref2/plugins/dfsound/dma.c 2008-03-22 14:46:36.000000000 +0100 +++ ref2/plugins/dfsound/dma.c 2008-03-22 13:01:57.000000000 +0100 @@ -34,11 +34,11 @@ // READ DMA (one value) //////////////////////////////////////////////////////////////////////// -unsigned short CALLBACK SPUreadDMA(void) +u16 CALLBACK SPUreadDMA(void) { - unsigned short s=spuMem[spuAddr>>1]; + u16 s=spuMem[spuAddr>>1]; spuAddr+=2; - if(spuAddr>0x7ffff) spuAddr=0; + if (spuAddr>0x7ffff) spuAddr=0; iWatchDog=0; @@ -49,7 +49,7 @@ // READ DMA (many values) //////////////////////////////////////////////////////////////////////// -void CALLBACK SPUreadDMAMem(unsigned short * pusPSXMem,int iSize) +void CALLBACK SPUreadDMAMem(u16 * pusPSXMem, int iSize) { int i; --- ref2/plugins/dfsound/dma.h 2008-03-22 14:46:36.000000000 +0100 +++ ref2/plugins/dfsound/dma.h 2008-03-22 12:59:08.000000000 +0100 @@ -25,7 +25,8 @@ //*************************************************************************// -unsigned short CALLBACK SPUreadDMA(void); -void CALLBACK SPUreadDMAMem(unsigned short * pusPSXMem,int iSize); -void CALLBACK SPUwriteDMA(unsigned short val); -void CALLBACK SPUwriteDMAMem(unsigned short * pusPSXMem,int iSize); +u16 CALLBACK SPUreadDMA(void); +void CALLBACK SPUreadDMAMem(u16 * pusPSXMem, int iSize); +void CALLBACK SPUwriteDMA(u16 val); +void CALLBACK SPUwriteDMAMem(u16 * pusPSXMem, int iSize); + --- ref2/plugins/dfsound/dsoundoss.h 2008-03-22 14:46:36.000000000 +0100 +++ ref2/plugins/dfsound/dsoundoss.h 2008-03-22 12:59:18.000000000 +0100 @@ -1,36 +1,34 @@ -/*************************************************************************** - dsoundoss.h - description - ------------------- - begin : Wed May 15 2002 - copyright : (C) 2002 by Pete Bernert - email : BlackDove@addcom.de - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. See also the license.txt file for * - * additional informations. * - * * - ***************************************************************************/ - -//*************************************************************************// -// History of changes: -// -// 2002/05/15 - Pete -// - generic cleanup for the Peops release -// -//*************************************************************************// - - -void SetupSound(void); -void RemoveSound(void); -unsigned long SoundGetBytesBuffered(void); -void SoundFeedStreamData(unsigned char* pSound,long lBytes); - -#ifndef _WINDOWS -unsigned long timeGetTime_spu(); -#endif +/*************************************************************************** + dsoundoss.h - description + ------------------- + begin : Wed May 15 2002 + copyright : (C) 2002 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +//*************************************************************************// +// History of changes: +// +// 2002/05/15 - Pete +// - generic cleanup for the Peops release +// +//*************************************************************************// + + +void SetupSound(void); +void RemoveSound(void); +u32 SoundGetBytesBuffered(void); +void SoundFeedStreamData(u8* pSound, long lBytes); + +u32 timeGetTime_spu(); --- ref2/plugins/dfsound/externals.h 2008-03-22 14:46:36.000000000 +0100 +++ ref2/plugins/dfsound/externals.h 2008-03-22 13:03:19.000000000 +0100 @@ -126,9 +126,9 @@ int SB[32+32]; // Pete added another 32 dwords in 1.6 ... prevents overflow issues with gaussian/cubic interpolation (thanx xodnizel!), and can be used for even better interpolations, eh? :) int sval; - unsigned char * pStart; // start ptr into sound mem - unsigned char * pCurr; // current pos in sound mem - unsigned char * pLoop; // loop ptr in sound mem + u8 * pStart; // start ptr into sound mem + u8 * pCurr; // current pos in sound mem + u8 * pLoop; // loop ptr in sound mem int bOn; // is channel active (sample playing?) int bStop; // is channel stopped (sample _can_ still be playing, ADSR Release phase) @@ -206,11 +206,6 @@ int IN_COEF_R; // (coef.) } REVERBInfo; -#ifdef _WINDOWS -extern HINSTANCE hInst; -#define WM_MUTE (WM_USER+543) -#endif - /////////////////////////////////////////////////////////// // SPU.C globals /////////////////////////////////////////////////////////// @@ -219,11 +214,11 @@ // psx buffers / addresses -extern unsigned short regArea[]; -extern unsigned short spuMem[]; -extern unsigned char * spuMemC; -extern unsigned char * pSpuIrq; -extern unsigned char * pSpuBuffer; +extern u16 regArea[]; +extern u16 spuMem[]; +extern u8 * spuMemC; +extern u8 * pSpuIrq; +extern u8 * pSpuBuffer; // user settings @@ -244,26 +239,21 @@ extern SPUCHAN s_chan[]; extern REVERBInfo rvb; -extern unsigned long dwNoiseVal; -extern unsigned short spuCtrl; -extern unsigned short spuStat; -extern unsigned short spuIrq; -extern unsigned long spuAddr; +extern u32 dwNoiseVal; +extern u16 spuCtrl; +extern u16 spuStat; +extern u16 spuIrq; +extern u32 spuAddr; extern int bEndThread; extern int bThreadEnded; extern int bSpuInit; -extern unsigned long dwNewChannel; +extern u32 dwNewChannel; extern int SSumR[]; extern int SSumL[]; extern int iCycle; extern short * pS; -#ifdef _WINDOWS -extern HWND hWMain; // window handle -extern HWND hWDebug; -#endif - extern void (CALLBACK *cddavCallback)(unsigned short,unsigned short); #endif @@ -274,9 +264,7 @@ #ifndef _IN_CFG -#ifndef _WINDOWS extern char * pConfigFile; -#endif #endif @@ -286,11 +274,6 @@ #ifndef _IN_DSOUND -#ifdef _WINDOWS -extern unsigned long LastWrite; -extern unsigned long LastPlay; -#endif - #endif /////////////////////////////////////////////////////////// @@ -299,10 +282,6 @@ #ifndef _IN_RECORD -#ifdef _WINDOWS -extern int iDoRecord; -#endif - #endif /////////////////////////////////////////////////////////// @@ -313,13 +292,13 @@ extern xa_decode_t * xapGlobal; -extern uint32_t * XAFeed; -extern uint32_t * XAPlay; -extern uint32_t * XAStart; -extern uint32_t * XAEnd; +extern u32 * XAFeed; +extern u32 * XAPlay; +extern u32 * XAStart; +extern u32 * XAEnd; -extern uint32_t XARepeat; -extern uint32_t XALastVal; +extern u32 XARepeat; +extern u32 XALastVal; extern int iLeftXAVol; extern int iRightXAVol; --- ref2/plugins/dfsound/freeze.c 2008-03-22 14:46:36.000000000 +0100 +++ ref2/plugins/dfsound/freeze.c 2008-03-22 13:00:31.000000000 +0100 @@ -46,21 +46,21 @@ typedef struct { char szSPUName[8]; - uint32_t ulFreezeVersion; - uint32_t ulFreezeSize; - unsigned char cSPUPort[0x200]; - unsigned char cSPURam[0x80000]; + u32 ulFreezeVersion; + u32 ulFreezeSize; + u8 cSPUPort[0x200]; + u8 cSPURam[0x80000]; xa_decode_t xaS; } SPUFreeze_t; typedef struct { - unsigned short spuIrq; - uint32_t pSpuIrq; - uint32_t dummy0; - uint32_t dummy1; - uint32_t dummy2; - uint32_t dummy3; + u16 spuIrq; + u32 pSpuIrq; + u32 dummy0; + u32 dummy1; + u32 dummy2; + u32 dummy3; SPUCHAN s_chan[MAXCHAN]; @@ -75,7 +75,7 @@ // SPUFREEZE: called by main emu on savestate load/save //////////////////////////////////////////////////////////////////////// -long CALLBACK SPUfreeze(uint32_t ulFreezeMode,SPUFreeze_t * pF) +long CALLBACK SPUfreeze(u32 ulFreezeMode, SPUFreeze_t * pF) { int i;SPUOSSFreeze_t * pFO; @@ -222,3 +222,4 @@ } //////////////////////////////////////////////////////////////////////// + --- ref2/plugins/dfsound/gauss_i.h 2008-03-22 14:46:36.000000000 +0100 +++ ref2/plugins/dfsound/gauss_i.h 2008-03-22 13:00:53.000000000 +0100 @@ -158,5 +158,8 @@ 0x000, 0x191, 0x517, 0x157, 0x000, 0x18D, 0x518, 0x15B, 0x000, 0x189, 0x518, 0x15F, 0x000, 0x185, 0x518, 0x162, 0x000, 0x181, 0x518, 0x166, 0x000, 0x17D, 0x518, 0x16A, - 0x000, 0x17A, 0x519, 0x16E, 0x000, 0x176, 0x519, 0x172}; + 0x000, 0x17A, 0x519, 0x16E, 0x000, 0x176, 0x519, 0x172 +}; + #endif + --- ref2/plugins/dfsound/oss.c 2008-03-22 14:46:36.000000000 +0100 +++ ref2/plugins/dfsound/oss.c 2008-03-22 13:07:07.000000000 +0100 @@ -36,16 +36,14 @@ #include "externals.h" -#ifndef _WINDOWS - //////////////////////////////////////////////////////////////////////// -// small linux time helper... only used for watchdog -//////////////////////////////////////////////////////////////////////// - -unsigned long timeGetTime_spu() -{ - struct timeval tv; - gettimeofday(&tv, 0); // well, maybe there are better ways +// small linux time helper... only used for watchdog +//////////////////////////////////////////////////////////////////////// + +u32 timeGetTime_spu() +{ + struct timeval tv; + gettimeofday(&tv, 0); // well, maybe there are better ways return tv.tv_sec * 1000 + tv.tv_usec/1000; // to do that, but at least it works } @@ -155,10 +153,10 @@ // GET BYTES BUFFERED //////////////////////////////////////////////////////////////////////// -unsigned long SoundGetBytesBuffered(void) +u32 SoundGetBytesBuffered(void) { audio_buf_info info; - unsigned long l; + u32 l; if(oss_audio_fd == -1) return SOUNDSIZE; if(ioctl(oss_audio_fd,SNDCTL_DSP_GETOSPACE,&info)==-1) @@ -177,10 +175,9 @@ // FEED SOUND DATA //////////////////////////////////////////////////////////////////////// -void SoundFeedStreamData(unsigned char* pSound,long lBytes) +void SoundFeedStreamData(u8* pSound,long lBytes) { if(oss_audio_fd == -1) return; write(oss_audio_fd,pSound,lBytes); } -#endif --- ref2/plugins/dfsound/oss.h 2008-03-22 14:46:36.000000000 +0100 +++ ref2/plugins/dfsound/oss.h 2008-03-22 13:07:25.000000000 +0100 @@ -33,3 +33,4 @@ #define OSS_SPEED_44100 44100 #endif // _OSS_SOUND_H +