Commit Graph

44 Commits

Author SHA1 Message Date
Flyinghead c809c6c56f Merge branch 'fh/mymaster' into fh/master-merge 2019-03-25 16:47:47 +01:00
Christoph "baka0815" Schwerdtfeger 1b8f45c751 ALSA: remove unused variables
loops and size are unused, so just remove them while we're here.
2019-01-16 19:14:37 +01:00
Christoph "baka0815" Schwerdtfeger 347fcf5c6c ALSA: make device configurable
Trying to load the device from the emu.cfg and if not set (should be the default for everyone currently) use the existing procedure to try to determine the device (default > plughw:0,0,0 > plughw:0,0).
2019-01-16 19:04:32 +01:00
flyinghead ce65be2f63 dsound: always wait on push 2018-10-04 10:56:07 +02:00
Flyinghead 7ce4fccb37 Merge remote-tracking branch 'origin/master' into fh/mymaster 2018-09-20 17:28:41 +02:00
Stefanos Kornilios Mitsis Poiitidis d4f12fae64
Merge pull request #1327 from gameblabla/voidlinuxmusl
WIP: Fixes for Musl
2018-08-25 21:25:02 +03:00
gameblabla a40d8bc74b
add libao support 2018-08-25 21:24:30 +02:00
gameblabla 55645a6fb7
Fixes for Musl 2018-08-24 23:34:03 +02:00
Christoph "baka0815" Schwerdtfeger 638a97d1ae Maple: Reworked the way controllers are created
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).
2018-08-21 00:33:18 -04:00
Flyinghead 9942bfc86e Merge branch clean-exit-light 2018-08-01 18:02:50 +02:00
Flyinghead 298bf08fc0 Add dsp interpreter to Mac build. Core audio buffering. 2018-08-01 15:02:45 +02:00
Greg V 5d69e19ed1 Build on FreeBSD (and potentially other BSD) 2018-07-08 15:43:10 +03:00
Flyinghead 49e172b169 Push more silence on audio underrun to catch up 2018-06-05 12:18:42 +02:00
Flyinghead fe71519d1b Write some silence on audio underruns 2018-05-01 17:25:42 +00:00
Flyinghead 5320c3adee Fixed previous screw up 2018-05-01 11:20:25 +02:00
Flyinghead a953a0baa7 Use ring buffer for samples and detect buffer underruns 2018-04-29 17:56:01 +02:00
Flyinghead 39e0f378cb OSX: add x64 target. Use JIT compiler. Clean exit. Use semaphore in core audio driver. Use layout-independent key codes to support int'l keyboards. Fixed GL window scaling. 2018-04-29 16:07:54 +02:00
Flyinghead 64a8ac1dd5 Add clean exit patch for x11 and 64-bit architecture 2018-04-27 16:54:15 +02:00
Flyinghead 94aa7c9e83 Fix alsa backend clicking noise on underrun. Set the buffer size to match the [omx] audio_latency setting 2018-04-27 10:49:23 +00:00
Stefan 8c967b0591
Merge pull request #1 from OrN/rpi2-stuff
omx audio backend, and dispmanx window
2018-04-11 21:33:45 +02:00
Nicolas HOUDELOT 5c343a219c fix typo 2018-03-05 01:57:00 +01:00
verybadsoldier 7d49b2212d alsa-backend: initialize variable "sub unit dir". This variable is passed into alsa as a pointer. Alsa will write to it but also read (!) from it. So the read will give undesired behavior when variable is not initialized. Depending on current alsa-config/hardware it leads to an error "Invalid argument" when submitting the parameters by invoking "snd_pcm_hw_params" a few lines later.
Initializing the variable to -1 fixes it and means "set to exact value or less" (http://alsa.opensrc.org/HowTo_Asynchronous_Playback)
2016-10-18 22:31:31 +02:00
Preston Smith 6f1fa1ab08 omx audio backend, and dispmanx window 2016-09-21 17:21:13 -05:00
Stefanos Kornilios Mitsis Poiitidis 4282395528 apple: Add primitive core audio support
Also made the project xcode 7 friendly
2015-09-29 03:10:19 +02:00
Jan Holthuis 42f7919c48 cfg: Add virtual entry support 2015-08-24 13:52:01 +02:00
Stefanos Kornilios Mitsis Poiitidis f62d532b78 Audiostream: Don't log on every push if audio is disabled
There is an initialization warning which is enough to warn users
2015-07-28 23:52:48 +02:00
Stefanos Kornilios Mitsis Poiitidis b385575d6f Get x64 building 2015-07-13 21:13:51 +02:00
Stefanos Kornilios Mitsis Poiitidis b5108993c9 Audio: Fix windows build 2015-07-05 14:53:43 +02:00
Jan Holthuis 6ae3c5d907 Introduce USE_ALSA and accomodate Makefiles
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.
2015-06-27 20:45:42 +02:00
Jan Holthuis a9771c918d Added PulseAudio backend
This commit introduces PulseAudio support using PulseAudio's "Simple
API".

The PulseAudio backend will be included during compilation if
USE_PULSEAUDIO is defined.
2015-06-27 20:44:54 +02:00
Jan Holthuis c17c7502d8 Added newline to end of files and removed obsolete code 2015-06-27 20:44:53 +02:00
Jan Holthuis 1c1e779500 Added Android audio backend
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.
2015-06-27 20:44:53 +02:00
Jan Holthuis a65b752592 Added DirectSound audio backend
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.
2015-06-27 20:44:53 +02:00
Jan Holthuis 167fba4c9f Added ALSA audio backend
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.
2015-06-27 20:44:53 +02:00
Jan Holthuis f6d2e3fa7e Added OSS audio backend
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).
2015-06-27 20:42:40 +02:00
Jan Holthuis e3f1784a0f Implement audio backend system
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.
2015-06-27 20:41:49 +02:00
Jan Holthuis 35968c8291 Rename os_Push() to PushAudio() for consistency 2015-06-27 20:41:05 +02:00
Jan Holthuis 55c6667753 Rename audiostream_rif.h to audiostream.h
This makes the naming more consistent.
2015-06-27 20:40:19 +02:00
Jan Holthuis 4c5682ac89 Define audiostream.cpp's time_diff at global scope
There's no need to do this inside the InitAudio() function.
2015-06-27 20:39:28 +02:00
Stefanos Kornilios Mitsis Poiitidis 9c2a4dc5a4 iOS fixes 2015-05-16 01:04:30 -07:00
Stefanos Kornilios Mitsis Poiitidis d33ad6edfb Updating from linux/x64 2015-05-08 17:49:23 +02:00
Stefanos Kornilios Mitsis Poiitidis a05760260e Move debugbreak to os module 2014-07-24 16:54:04 +03:00
Stefanos Kornilios Mitsis Poiitidis f5d29677b3 Merge branch 'androidui'
Conflicts:
	core/hw/pvr/spg.cpp
	core/hw/sh4/interpr/sh4_interpreter.cpp
	reicast/android/src/com/reicast/emulator/MainActivity.java
2013-12-28 22:28:50 +01:00
Stefanos Kornilios Mitsis Poiitidis 7ef9de3cae Moving code around, cleanups 2013-12-28 22:20:08 +01:00