Commit Graph

36 Commits

Author SHA1 Message Date
Flyinghead f72f4c49fb macos: fix freeze in !threaded. input: fix crash when saving mapping
audiostream: delete legacy [audio]disable option
2021-09-30 14:31:51 +02:00
vkedwardli a51f310e96
Add volume slider in audio settings (#329)
Use logarithmic volume scale
2021-08-26 13:30:23 +02:00
Flyinghead 6dfa9f7786 android: oboe audio driver. get rid of build variants
Issue #182
2021-04-30 19:57:11 +02:00
Flyinghead 73a969b1a4 alsa: set period size before buffer size. make it match SAMPLE_COUNT
simplify WriteSample
2021-03-23 16:27:57 +01:00
Flyinghead c3a95594f9 New option system
Fix per-game settings (Issue #115)
Automatic load/save state (Issue #173)
Reload Naomi/AW BIOS after per-game settings are loaded to allow
per-game BIOS region. (Issue #96)
Restrict Soul Reaver widescreen cheat to the EU version (Issue #188)
Disable UI elements for overridden settings
Clean up/simplify legacy Naomi ROM loading
2021-03-01 10:13:40 +01:00
Flyinghead 14393ea6b1 improved microphone emulation. support for linux and windows 2020-12-05 18:47:09 +01:00
scribam e99aac3575 Remove "using namespace std;" 2020-03-30 23:00:43 +02:00
scribam 4bf6802855 Cleanup include headers 2020-03-29 14:26:21 +02:00
Flyinghead 1abfdaf64e audio: pulse async driver, null driver, latency setting
Pulse: use async API instead of simple API
Null driver: no audio driver with accurate timing
Add latency setting to alsa, pulse and android drivers
android: start and stop AudioTrack on audiobackend init/term
Simplify audiostream. Get rid of "none" option
2020-03-14 22:46:40 +01:00
Flyinghead dd29a62811 remove buggy LimitFPSAuto option 2020-02-25 12:52:21 +01:00
scribam 49b7e0682b Cleanup 2019-09-07 20:36:13 +02:00
Flyinghead ad4218d617 audio: use new logging
other logging changes
2019-07-01 17:17:08 +02:00
Flyinghead 07b3f83343 audio: new option for automatic limitFPS
LimitFPS now can be enabled, disabled or automatic. The latter option
doesn't wait for audio if the emulator is running slow (over the last 2
secs)
Renamed `Audio Backend` to `Audio Driver` in the UI.
2019-05-20 19:12:28 +02:00
David Quintana f307f9d5ad Simplify. Smoothing adds no value there. 2019-05-02 03:36:10 +02:00
David Quintana ac9e6d147d Change speed-dependant limiting to rely on time dilation instead of frame rate. 2019-05-02 03:21:22 +02:00
David Miller d6f682a329 audiostream only wait if at speed 2019-05-01 12:01:45 -04:00
Christoph "baka0815" Schwerdtfeger 16f9200bfa AUDIO: Allow selection of backend 2019-04-05 22:22:46 +02:00
Christoph "baka0815" Schwerdtfeger b8ae61bc5c AUDIO: Sort audio plugins by name 2019-04-05 21:14:42 +02:00
Christoph "baka0815" Schwerdtfeger b443fe9b25 AUDIO: make the plugins self-registering
No need anymore for the RegisterAllBackends() function and all plugins in one place.
Use a static boolean to register every plugin by itself.
2019-04-05 21:05:18 +02:00
gameblabla a40d8bc74b
add libao support 2018-08-25 21:24:30 +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
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
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 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