A new function was introduced to abstract the setup of input devices for each os: os_SetupInput().
I hope I implemented this everywhere correctly and the behaviour is identical to before.
The new function mcfg_CreateNAOMIJamma() creates the NAOMI Jamma interface and is hidden behind a compile flag (same as before).
The previous function mcfg_CreateDevices() was renamed to mcfg_CreateDevicesFromConfig() because it creates the devices based on the configuration (``nb`` setting).
This introduces the USE_ALSA flag (replaces the somewhat hacky
"HOST_OS==OS_LINUX && !defined(TARGET_NACL32) && !defined(ANDROID)"
if case).
The Makefiles for beagle, gcwz, lin86 and pandora have been adapted to
reflect this change.
This commit introduces PulseAudio support using PulseAudio's "Simple
API".
The PulseAudio backend will be included during compilation if
USE_PULSEAUDIO is defined.
This *should* add the Android audio backend. I do not have any idea how
to do this properly, but I figured that this might work for the moment.
There's probably a lot of testing required for this to work.
This commit adds the DirectSound audio backend, which is a modified
version of core/oslib/ds_audiostream.cpp.
Porting this was a bit tricky, since ds_audiostream.cpp defined 3
extern functions that the other backends didn't have:
* bool os_IsAudioBuffered();
* bool os_IsAudioBufferedLots();
* int os_getusedSamples();
I came to the conclusion that these methods are obsolete since they are
only used core/windows/winmain.cpp in the function void os_wait_cycl(u32
cycl) - which is used nowhere. Thus, I removed os_wait_cycl and the
headers of the three functions in core/oslib/oslib.h. I also removed the
functions themselves (except for int os_getusedSamples(), which is still
used inside the directsound backend, but can safely declared static for
that purpose).
The DirectSound backend will be included during compilation if HOST_OS
is OS_WINDOWS.
This adds the OSS audio backend, which is basically a slightly modified
version of core/oslib/alsa_audiostream.cpp from the skmp/linux-x64
branch (as of commit cdf9f3dc971506c2efd979275c2869f064e1027c).
The ALSA backend will be included during compilation if HOST_OS is OS_LINUX
and neither TARGET_NACL32 nor ANDROID are defined. This should be
changed to a USE_ALSA flag in the future (for constistency and and
simplicity reasons), but i didn't want to put too much stuff into this
commit.
This adds the OSS audio backend and removes OSS code from
core/linux-dist/main.cpp and core/sdl/main.cpp.
The OSS backend will be included during compilation if the USE_OSS
flag is set.
Although OSS code in core/linux-dist/main.cpp depended on the
TARGET_PANDORA flag instead of USE_OSS, the latter should work too
since it is defined in the Pandora Makefile (lines 7 & 83).
This makes it possible to have multiple audio backends compiled into
reicast (e.g. ALSA & OSS on Linux). These can then selected by the user
via a config option ("backend" iin the "audio" section). It *should*
also be possible to reduce the number of platform-specific ifdefs with this
approach.
Audio backends need to define a struct (audiobackend_t) that holds a
pointer to it's init, push and term function and also a slug and a name
as string. They then need to pass a pointer to this struct to
RegisterAudioBackend() before InitAudio() is called.
For now, I defined a function (RegisterAllAudioBackends) that get's
called exactly once (i.e. upon first call of InitAudio()), where
we can put ifdef'd RegisterAudioBackend() calls into for each backend
that reicast supports.
Please note that this commit just implements the basic audio backend
system - no backends have been ported to the new API yet. For the meantime,
reicast will run without any audio support accross all systems.