2010-01-16 16:08:17 +00:00
|
|
|
/* ZeroSPU2
|
|
|
|
* Copyright (C) 2006-2010 zerofrog; modified by arcum42
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
2010-01-17 11:19:01 +00:00
|
|
|
#ifndef SOUNDTARGETS_H_INCLUDED
|
|
|
|
#define SOUNDTARGETS_H_INCLUDED
|
2010-01-16 16:08:17 +00:00
|
|
|
|
|
|
|
#include "Pcsx2Defs.h"
|
2010-01-17 11:19:01 +00:00
|
|
|
|
|
|
|
typedef void (*voidFunction)();
|
|
|
|
typedef int (*intFunction)();
|
|
|
|
typedef bool (*boolFunction)();
|
2010-01-16 16:08:17 +00:00
|
|
|
typedef void (*soundFeedFunction)(unsigned char *, long);
|
|
|
|
|
|
|
|
struct SoundCallbacks
|
|
|
|
{
|
|
|
|
intFunction SetupSound;
|
|
|
|
voidFunction RemoveSound;
|
|
|
|
intFunction SoundGetBytesBuffered;
|
|
|
|
soundFeedFunction SoundFeedVoiceData;
|
|
|
|
};
|
2010-01-17 11:19:01 +00:00
|
|
|
|
2010-01-16 16:08:17 +00:00
|
|
|
extern SoundCallbacks *SoundCmds;
|
|
|
|
extern u32 SOUNDSIZE;
|
2010-01-17 03:21:23 +00:00
|
|
|
extern s32 MaxBuffer;
|
2010-01-16 16:08:17 +00:00
|
|
|
|
|
|
|
// Target List
|
2010-01-17 03:21:23 +00:00
|
|
|
#ifdef __LINUX__
|
2010-01-17 11:19:01 +00:00
|
|
|
|
|
|
|
#if (!defined(ZEROSPU2_ALSA) && !defined(ZEROSPU2_OSS) && !defined(ZEROSPU2_PORTAUDIO))
|
2010-01-16 16:08:17 +00:00
|
|
|
#define ZEROSPU2_ALSA // Comment if Alsa isn't on the system.
|
2010-01-17 11:19:01 +00:00
|
|
|
#endif
|
|
|
|
|
2010-01-17 03:21:23 +00:00
|
|
|
#else
|
2010-01-17 11:19:01 +00:00
|
|
|
|
2010-01-17 03:21:23 +00:00
|
|
|
#define ZEROSPU2_DS
|
2010-01-17 11:19:01 +00:00
|
|
|
|
2010-01-17 03:21:23 +00:00
|
|
|
#endif
|
2010-01-16 16:08:17 +00:00
|
|
|
|
|
|
|
#ifdef ZEROSPU2_OSS
|
2010-01-17 03:21:23 +00:00
|
|
|
#include "OSS.h"
|
2010-01-16 16:08:17 +00:00
|
|
|
|
|
|
|
extern void InitOSS();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef ZEROSPU2_ALSA
|
2010-01-17 03:21:23 +00:00
|
|
|
#include "Alsa.h"
|
2010-01-16 16:08:17 +00:00
|
|
|
|
|
|
|
extern void InitAlsa();
|
|
|
|
#endif
|
|
|
|
|
2010-01-17 03:21:23 +00:00
|
|
|
#ifdef ZEROSPU2_DS
|
|
|
|
#include "dsound51.h"
|
|
|
|
|
|
|
|
extern void InitDSound();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef ZEROSPU2_PORTAUDIO
|
|
|
|
#include "PortAudio.h"
|
|
|
|
|
|
|
|
extern void InitPortAudio();
|
|
|
|
#endif
|
|
|
|
|
2010-01-16 16:08:17 +00:00
|
|
|
extern int SetupSound();
|
|
|
|
extern void RemoveSound();
|
|
|
|
extern int SoundGetBytesBuffered();
|
|
|
|
extern void SoundFeedVoiceData(unsigned char* pSound,long lBytes);
|
2010-01-17 11:19:01 +00:00
|
|
|
|
|
|
|
#endif // SOUNDTARGETS_H_INCLUDED
|