Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 140642 | Differences between
and this patch

Collapse All | Expand All

(-)ref2/plugins/dfsound/cfg.h (-31 / +25 lines)
Lines 1-36 Link Here
1
/***************************************************************************
1
/***************************************************************************
2
                            cfg.h  -  description
2
                            cfg.h  -  description
3
                             -------------------
3
                             -------------------
4
    begin                : Wed May 15 2002
4
    begin                : Wed May 15 2002
5
    copyright            : (C) 2002 by Pete Bernert
5
    copyright            : (C) 2002 by Pete Bernert
6
    email                : BlackDove@addcom.de
6
    email                : BlackDove@addcom.de
7
 ***************************************************************************/
7
 ***************************************************************************/
8
9
/***************************************************************************
10
 *                                                                         *
11
 *   This program is free software; you can redistribute it and/or modify  *
12
 *   it under the terms of the GNU General Public License as published by  *
13
 *   the Free Software Foundation; either version 2 of the License, or     *
14
 *   (at your option) any later version. See also the license.txt file for *
15
 *   additional informations.                                              *
16
 *                                                                         *
17
 ***************************************************************************/
18
19
//*************************************************************************//
20
// History of changes:
21
//
22
// 2002/05/15 - Pete
23
// - generic cleanup for the Peops release
24
//
25
//*************************************************************************//
26
8
9
/***************************************************************************
10
 *                                                                         *
11
 *   This program is free software; you can redistribute it and/or modify  *
12
 *   it under the terms of the GNU General Public License as published by  *
13
 *   the Free Software Foundation; either version 2 of the License, or     *
14
 *   (at your option) any later version. See also the license.txt file for *
15
 *   additional informations.                                              *
16
 *                                                                         *
17
 ***************************************************************************/
27
18
28
void ReadConfig(void);
19
//*************************************************************************//
20
// History of changes:
21
//
22
// 2002/05/15 - Pete
23
// - generic cleanup for the Peops release
24
//
25
//*************************************************************************//
29
26
30
27
31
#ifdef _WINDOWS
28
void ReadConfig(void);
32
BOOL CALLBACK AboutDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam);
33
BOOL CALLBACK DSoundDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam);
34
#else
35
void StartCfgTool(char * pCmdLine);
29
void StartCfgTool(char * pCmdLine);
36
#endif
30
(-)ref2/plugins/dfsound/debug.h (-3 lines)
Lines 24-29 Link Here
24
//
24
//
25
//*************************************************************************//
25
//*************************************************************************//
26
26
27
#ifdef _WINDOWS
28
BOOL CALLBACK DebugDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam);
29
#endif
(-)ref2/plugins/dfsound/dma.c (-4 / +4 lines)
Lines 34-44 Link Here
34
// READ DMA (one value)
34
// READ DMA (one value)
35
////////////////////////////////////////////////////////////////////////
35
////////////////////////////////////////////////////////////////////////
36
36
37
unsigned short CALLBACK SPUreadDMA(void)
37
u16 CALLBACK SPUreadDMA(void)
38
{
38
{
39
 unsigned short s=spuMem[spuAddr>>1];
39
 u16 s=spuMem[spuAddr>>1];
40
 spuAddr+=2;
40
 spuAddr+=2;
41
 if(spuAddr>0x7ffff) spuAddr=0;
41
 if (spuAddr>0x7ffff) spuAddr=0;
42
42
43
 iWatchDog=0;
43
 iWatchDog=0;
44
44
Lines 49-55 Link Here
49
// READ DMA (many values)
49
// READ DMA (many values)
50
////////////////////////////////////////////////////////////////////////
50
////////////////////////////////////////////////////////////////////////
51
51
52
void CALLBACK SPUreadDMAMem(unsigned short * pusPSXMem,int iSize)
52
void CALLBACK SPUreadDMAMem(u16 * pusPSXMem, int iSize)
53
{
53
{
54
 int i;
54
 int i;
55
55
(-)ref2/plugins/dfsound/dma.h (-4 / +5 lines)
Lines 25-31 Link Here
25
//*************************************************************************//
25
//*************************************************************************//
26
26
27
27
28
unsigned short CALLBACK SPUreadDMA(void);
28
u16 CALLBACK SPUreadDMA(void);
29
void CALLBACK SPUreadDMAMem(unsigned short * pusPSXMem,int iSize);
29
void CALLBACK SPUreadDMAMem(u16 * pusPSXMem, int iSize);
30
void CALLBACK SPUwriteDMA(unsigned short val);
30
void CALLBACK SPUwriteDMA(u16 val);
31
void CALLBACK SPUwriteDMAMem(unsigned short * pusPSXMem,int iSize);
31
void CALLBACK SPUwriteDMAMem(u16 * pusPSXMem, int iSize);
32
(-)ref2/plugins/dfsound/dsoundoss.h (-35 / +33 lines)
Lines 1-36 Link Here
1
/***************************************************************************
1
/***************************************************************************
2
                         dsoundoss.h  -  description
2
                         dsoundoss.h  -  description
3
                             -------------------
3
                             -------------------
4
    begin                : Wed May 15 2002
4
    begin                : Wed May 15 2002
5
    copyright            : (C) 2002 by Pete Bernert
5
    copyright            : (C) 2002 by Pete Bernert
6
    email                : BlackDove@addcom.de
6
    email                : BlackDove@addcom.de
7
 ***************************************************************************/
7
 ***************************************************************************/
8
8
9
/***************************************************************************
9
/***************************************************************************
10
 *                                                                         *
10
 *                                                                         *
11
 *   This program is free software; you can redistribute it and/or modify  *
11
 *   This program is free software; you can redistribute it and/or modify  *
12
 *   it under the terms of the GNU General Public License as published by  *
12
 *   it under the terms of the GNU General Public License as published by  *
13
 *   the Free Software Foundation; either version 2 of the License, or     *
13
 *   the Free Software Foundation; either version 2 of the License, or     *
14
 *   (at your option) any later version. See also the license.txt file for *
14
 *   (at your option) any later version. See also the license.txt file for *
15
 *   additional informations.                                              *
15
 *   additional informations.                                              *
16
 *                                                                         *
16
 *                                                                         *
17
 ***************************************************************************/
17
 ***************************************************************************/
18
18
19
//*************************************************************************//
19
//*************************************************************************//
20
// History of changes:
20
// History of changes:
21
//
21
//
22
// 2002/05/15 - Pete
22
// 2002/05/15 - Pete
23
// - generic cleanup for the Peops release
23
// - generic cleanup for the Peops release
24
//
24
//
25
//*************************************************************************//
25
//*************************************************************************//
26
26
27
27
28
void SetupSound(void);
28
void SetupSound(void);
29
void RemoveSound(void);
29
void RemoveSound(void);
30
unsigned long SoundGetBytesBuffered(void);
30
u32 SoundGetBytesBuffered(void);
31
void SoundFeedStreamData(unsigned char* pSound,long lBytes);
31
void SoundFeedStreamData(u8* pSound, long lBytes);
32
32
33
#ifndef _WINDOWS
33
u32 timeGetTime_spu();
34
unsigned long timeGetTime_spu();
35
#endif
36
34
(-)ref2/plugins/dfsound/externals.h (-41 / +20 lines)
Lines 126-134 Link Here
126
 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? :)
126
 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? :)
127
 int               sval;
127
 int               sval;
128
128
129
 unsigned char *   pStart;                             // start ptr into sound mem
129
 u8 *              pStart;                             // start ptr into sound mem
130
 unsigned char *   pCurr;                              // current pos in sound mem
130
 u8 *              pCurr;                              // current pos in sound mem
131
 unsigned char *   pLoop;                              // loop ptr in sound mem
131
 u8 *              pLoop;                              // loop ptr in sound mem
132
132
133
 int               bOn;                                // is channel active (sample playing?)
133
 int               bOn;                                // is channel active (sample playing?)
134
 int               bStop;                              // is channel stopped (sample _can_ still be playing, ADSR Release phase)
134
 int               bStop;                              // is channel stopped (sample _can_ still be playing, ADSR Release phase)
Lines 206-216 Link Here
206
 int IN_COEF_R;      // (coef.)
206
 int IN_COEF_R;      // (coef.)
207
} REVERBInfo;
207
} REVERBInfo;
208
208
209
#ifdef _WINDOWS
210
extern HINSTANCE hInst;
211
#define WM_MUTE (WM_USER+543)
212
#endif
213
214
///////////////////////////////////////////////////////////
209
///////////////////////////////////////////////////////////
215
// SPU.C globals
210
// SPU.C globals
216
///////////////////////////////////////////////////////////
211
///////////////////////////////////////////////////////////
Lines 219-229 Link Here
219
214
220
// psx buffers / addresses
215
// psx buffers / addresses
221
216
222
extern unsigned short  regArea[];                        
217
extern u16  regArea[];                        
223
extern unsigned short  spuMem[];
218
extern u16  spuMem[];
224
extern unsigned char * spuMemC;
219
extern u8 * spuMemC;
225
extern unsigned char * pSpuIrq;
220
extern u8 * pSpuIrq;
226
extern unsigned char * pSpuBuffer;
221
extern u8 * pSpuBuffer;
227
222
228
// user settings
223
// user settings
229
224
Lines 244-269 Link Here
244
extern SPUCHAN s_chan[];
239
extern SPUCHAN s_chan[];
245
extern REVERBInfo rvb;
240
extern REVERBInfo rvb;
246
241
247
extern unsigned long dwNoiseVal;
242
extern u32 dwNoiseVal;
248
extern unsigned short spuCtrl;
243
extern u16 spuCtrl;
249
extern unsigned short spuStat;
244
extern u16 spuStat;
250
extern unsigned short spuIrq;
245
extern u16 spuIrq;
251
extern unsigned long  spuAddr;
246
extern u32  spuAddr;
252
extern int      bEndThread; 
247
extern int      bEndThread; 
253
extern int      bThreadEnded;
248
extern int      bThreadEnded;
254
extern int      bSpuInit;
249
extern int      bSpuInit;
255
extern unsigned long dwNewChannel;
250
extern u32 dwNewChannel;
256
251
257
extern int      SSumR[];
252
extern int      SSumR[];
258
extern int      SSumL[];
253
extern int      SSumL[];
259
extern int      iCycle;
254
extern int      iCycle;
260
extern short *  pS;
255
extern short *  pS;
261
256
262
#ifdef _WINDOWS
263
extern HWND    hWMain;                               // window handle
264
extern HWND    hWDebug;
265
#endif
266
267
extern void (CALLBACK *cddavCallback)(unsigned short,unsigned short);
257
extern void (CALLBACK *cddavCallback)(unsigned short,unsigned short);
268
258
269
#endif
259
#endif
Lines 274-282 Link Here
274
264
275
#ifndef _IN_CFG
265
#ifndef _IN_CFG
276
266
277
#ifndef _WINDOWS
278
extern char * pConfigFile;
267
extern char * pConfigFile;
279
#endif
280
268
281
#endif
269
#endif
282
270
Lines 286-296 Link Here
286
274
287
#ifndef _IN_DSOUND
275
#ifndef _IN_DSOUND
288
276
289
#ifdef _WINDOWS
290
extern unsigned long LastWrite;
291
extern unsigned long LastPlay;
292
#endif
293
294
#endif
277
#endif
295
278
296
///////////////////////////////////////////////////////////
279
///////////////////////////////////////////////////////////
Lines 299-308 Link Here
299
282
300
#ifndef _IN_RECORD
283
#ifndef _IN_RECORD
301
284
302
#ifdef _WINDOWS
303
extern int iDoRecord;
304
#endif
305
306
#endif
285
#endif
307
286
308
///////////////////////////////////////////////////////////
287
///////////////////////////////////////////////////////////
Lines 313-325 Link Here
313
292
314
extern xa_decode_t   * xapGlobal;
293
extern xa_decode_t   * xapGlobal;
315
294
316
extern uint32_t * XAFeed;
295
extern u32 * XAFeed;
317
extern uint32_t * XAPlay;
296
extern u32 * XAPlay;
318
extern uint32_t * XAStart;
297
extern u32 * XAStart;
319
extern uint32_t * XAEnd;
298
extern u32 * XAEnd;
320
299
321
extern uint32_t   XARepeat;
300
extern u32   XARepeat;
322
extern uint32_t   XALastVal;
301
extern u32   XALastVal;
323
302
324
extern int           iLeftXAVol;
303
extern int           iLeftXAVol;
325
extern int           iRightXAVol;
304
extern int           iRightXAVol;
(-)ref2/plugins/dfsound/freeze.c (-11 / +12 lines)
Lines 46-66 Link Here
46
typedef struct
46
typedef struct
47
{
47
{
48
 char          szSPUName[8];
48
 char          szSPUName[8];
49
 uint32_t ulFreezeVersion;
49
 u32 ulFreezeVersion;
50
 uint32_t ulFreezeSize;
50
 u32 ulFreezeSize;
51
 unsigned char cSPUPort[0x200];
51
 u8 cSPUPort[0x200];
52
 unsigned char cSPURam[0x80000];
52
 u8 cSPURam[0x80000];
53
 xa_decode_t   xaS;     
53
 xa_decode_t   xaS;     
54
} SPUFreeze_t;
54
} SPUFreeze_t;
55
55
56
typedef struct
56
typedef struct
57
{
57
{
58
 unsigned short  spuIrq;
58
 u16  spuIrq;
59
 uint32_t   pSpuIrq;
59
 u32   pSpuIrq;
60
 uint32_t   dummy0;
60
 u32   dummy0;
61
 uint32_t   dummy1;
61
 u32   dummy1;
62
 uint32_t   dummy2;
62
 u32   dummy2;
63
 uint32_t   dummy3;
63
 u32   dummy3;
64
64
65
 SPUCHAN  s_chan[MAXCHAN];   
65
 SPUCHAN  s_chan[MAXCHAN];   
66
66
Lines 75-81 Link Here
75
// SPUFREEZE: called by main emu on savestate load/save
75
// SPUFREEZE: called by main emu on savestate load/save
76
////////////////////////////////////////////////////////////////////////
76
////////////////////////////////////////////////////////////////////////
77
77
78
long CALLBACK SPUfreeze(uint32_t ulFreezeMode,SPUFreeze_t * pF)
78
long CALLBACK SPUfreeze(u32 ulFreezeMode, SPUFreeze_t * pF)
79
{
79
{
80
 int i;SPUOSSFreeze_t * pFO;
80
 int i;SPUOSSFreeze_t * pFO;
81
81
Lines 222-224 Link Here
222
}
222
}
223
223
224
////////////////////////////////////////////////////////////////////////
224
////////////////////////////////////////////////////////////////////////
225
(-)ref2/plugins/dfsound/gauss_i.h (-1 / +4 lines)
Lines 158-162 Link Here
158
	0x000, 0x191, 0x517, 0x157, 0x000, 0x18D, 0x518, 0x15B, 
158
	0x000, 0x191, 0x517, 0x157, 0x000, 0x18D, 0x518, 0x15B, 
159
	0x000, 0x189, 0x518, 0x15F, 0x000, 0x185, 0x518, 0x162, 
159
	0x000, 0x189, 0x518, 0x15F, 0x000, 0x185, 0x518, 0x162, 
160
	0x000, 0x181, 0x518, 0x166, 0x000, 0x17D, 0x518, 0x16A, 
160
	0x000, 0x181, 0x518, 0x166, 0x000, 0x17D, 0x518, 0x16A, 
161
	0x000, 0x17A, 0x519, 0x16E, 0x000, 0x176, 0x519, 0x172};
161
	0x000, 0x17A, 0x519, 0x16E, 0x000, 0x176, 0x519, 0x172
162
};
163
162
#endif
164
#endif
165
(-)ref2/plugins/dfsound/oss.c (-13 / +10 lines)
Lines 36-51 Link Here
36
36
37
#include "externals.h"
37
#include "externals.h"
38
38
39
#ifndef _WINDOWS
40
41
////////////////////////////////////////////////////////////////////////
39
////////////////////////////////////////////////////////////////////////
42
// small linux time helper... only used for watchdog
40
// small linux time helper... only used for watchdog
43
////////////////////////////////////////////////////////////////////////
41
////////////////////////////////////////////////////////////////////////
44
42
45
unsigned long timeGetTime_spu()
43
u32 timeGetTime_spu()
46
{
44
{
47
 struct timeval tv;
45
 struct timeval tv;
48
 gettimeofday(&tv, 0);                                 // well, maybe there are better ways
46
 gettimeofday(&tv, 0);                                 // well, maybe there are better ways
49
 return tv.tv_sec * 1000 + tv.tv_usec/1000;            // to do that, but at least it works
47
 return tv.tv_sec * 1000 + tv.tv_usec/1000;            // to do that, but at least it works
50
}
48
}
51
49
Lines 155-164 Link Here
155
// GET BYTES BUFFERED
153
// GET BYTES BUFFERED
156
////////////////////////////////////////////////////////////////////////
154
////////////////////////////////////////////////////////////////////////
157
155
158
unsigned long SoundGetBytesBuffered(void)
156
u32 SoundGetBytesBuffered(void)
159
{
157
{
160
 audio_buf_info info;
158
 audio_buf_info info;
161
 unsigned long l;
159
 u32 l;
162
160
163
 if(oss_audio_fd == -1) return SOUNDSIZE;
161
 if(oss_audio_fd == -1) return SOUNDSIZE;
164
 if(ioctl(oss_audio_fd,SNDCTL_DSP_GETOSPACE,&info)==-1)
162
 if(ioctl(oss_audio_fd,SNDCTL_DSP_GETOSPACE,&info)==-1)
Lines 177-186 Link Here
177
// FEED SOUND DATA
175
// FEED SOUND DATA
178
////////////////////////////////////////////////////////////////////////
176
////////////////////////////////////////////////////////////////////////
179
177
180
void SoundFeedStreamData(unsigned char* pSound,long lBytes)
178
void SoundFeedStreamData(u8* pSound,long lBytes)
181
{
179
{
182
 if(oss_audio_fd == -1) return;
180
 if(oss_audio_fd == -1) return;
183
 write(oss_audio_fd,pSound,lBytes);
181
 write(oss_audio_fd,pSound,lBytes);
184
}
182
}
185
183
186
#endif
(-)ref2/plugins/dfsound/oss.h (+1 lines)
Lines 33-35 Link Here
33
#define OSS_SPEED_44100	44100
33
#define OSS_SPEED_44100	44100
34
34
35
#endif // _OSS_SOUND_H
35
#endif // _OSS_SOUND_H
36

Return to bug 140642