Commit Graph

353 Commits

Author SHA1 Message Date
twinaphex
aae3b10169 Move baked-in dependencies to 'deps' directory 2012-11-20 03:34:45 +01:00
twinaphex
1d99cb62a2 (Xbox 1) Build fixes - don't compile in pragma comments for
XBOX
2012-11-15 14:24:56 +01:00
Themaister
0e729bcaa0 Style nits. 2012-11-15 09:40:31 +01:00
OV2
54d39dff74 win32: make d3d9 compile in msvc, add linker pragmas to source files 2012-11-14 21:07:06 +01:00
Themaister
752b7608e7 Fix audio test. 2012-11-07 23:42:23 +01:00
Themaister
6421fe248b Optimize SINC resampler.
Trade memory for performance. Avoid using linear interpolation
between phases.
2012-11-07 23:27:31 +01:00
Themaister
bebe0d78a7 Optimize sinc for AVX as well.
Disable it for now however, as it's slightly slower
than SSE1 for the few taps we're using.

From testing, it's 10-20% faster when number of taps are increased.
The AVX path might need some more tuning, but it's fair to
assume the algorithm is memory bound.
2012-11-06 18:52:09 +01:00
Themaister
330e724f34 Use vec_madd instead of vec_mul.
vec_mul was apparently a POWER7 instruction.
2012-11-06 09:26:28 +01:00
twinaphex
876bf69a80 (PS3) Hack around vec_mul not being supported for PS3 VMX/Altivec
for now
2012-11-06 03:33:00 +01:00
Themaister
61a5b42ee7 Purge some more fixed point cruft. 2012-11-03 23:03:57 +01:00
Themaister
aaefdbf27e Remove lingering HAVE_FIXED_POINT define. 2012-11-03 23:02:27 +01:00
Themaister
91edc8ff49 Add volume control.
It imposes no performance loss as it is performed
during s16->float conversion.

It is however grouped together with check_mute.
2012-11-03 14:15:03 +01:00
twinaphex
34f5d0ceb6 Revert "(OpenSL/Android) Reduce latency by going from 8 to 6 buffers"
This reverts commit 26d6d18a02.
2012-11-01 21:08:04 +01:00
twinaphex
26d6d18a02 (OpenSL/Android) Reduce latency by going from 8 to 6 buffers 2012-11-01 20:21:07 +01:00
Themaister
50d6080af5 Print more sensible output for SNR. 2012-10-31 00:03:15 +01:00
Themaister
ff9167f56b Remove obsolete fixed-point test. 2012-10-30 23:54:30 +01:00
twinaphex
670289839f (Android/OpenSL) Improved latency - still not good enough though 2012-10-30 17:33:33 +01:00
twinaphex
fb25f31598 (Android/OpenSL) Bigger audio buffers - bigger latency/longer
delay in audio, but no audio breakup - also applied -O3 and -funroll-loops
for Android Makefile - seems to help
2012-10-30 05:25:14 +01:00
twinaphex
033e94acfd (Android) Force audio input control rate in OpenSL ES driver 2012-10-30 03:50:18 +01:00
twinaphex
492bbc7d78 (OpenSL) Fix derp 2012-10-30 00:48:16 +01:00
Themaister
16d67a43cd Add rate-control interfaces to SL. 2012-10-30 00:40:05 +01:00
Themaister
d9a903b293 Revert "Might improve audio performance in SL."
This broke stuff.
2012-10-30 00:37:00 +01:00
Themaister
5812a5e445 Might improve audio performance in SL. 2012-10-30 00:20:32 +01:00
twinaphex
6e79dd6046 (OpenSL) Fixed fall-through in sl_init 2012-10-30 00:05:24 +01:00
twinaphex
dccfb80010 (OpenSL) compiles now 2012-10-30 00:01:47 +01:00
Themaister
1554f8ce2d Rewrite OpenSL driver (untested).
Use openal-soft-android as a starting point.
2012-10-29 23:55:36 +01:00
Themaister
c92f1e8281 Do not fail in OSS if write() returns 0. 2012-10-23 22:27:15 +02:00
twinaphex
497f4dfb31 (OpenSL ES) Add workaround for OutputMix - setting volume not working
with Android OSL ES implementation - seems to fail at init now though
2012-10-18 08:03:21 +02:00
twinaphex
943ee288e1 (OpenSL ES) memset pcmData to 0 at init 2012-10-18 07:51:57 +02:00
twinaphex
26fcdae48b (OpenSL ES) Small nits 2012-10-18 07:33:45 +02:00
twinaphex
161afd98dc (OpenSL ES) OpenSL init seems to work now despite OutputMix interface
apparently being unsupported on Android. Included note for workaround.
2012-10-18 07:28:56 +02:00
twinaphex
6bf7c3cb06 Update credits for collaborated files 2012-10-18 06:06:55 +02:00
twinaphex
63238d3b67 (OpenSL) Add preliminary driver - OpenSL ES implementation in NDK
is a half-baked, half-implemented hackfest, so will have to go over
Android-specific examples to get this to work
2012-10-18 05:46:09 +02:00
Themaister
be7a63932f Remove output_rate from DSP plug. 2012-10-16 12:54:58 +02:00
Themaister
d027287d71 Leave some notes about downsampling. 2012-10-16 12:54:58 +02:00
Themaister
a22193d83d Fix potential crash in hermite as well. 2012-10-15 23:13:51 +02:00
Themaister
34713f40d1 Fix spurious segfaults when ratio dips below 1. 2012-10-15 22:53:05 +02:00
twinaphex
174c7d9d98 (RARCH_CONSOLE) g_console struct removed now - console settings
now a part of g_extern and also compiled in for PC - will use
this for RMenu
2012-10-15 06:25:12 +02:00
Themaister
11b9f039b2 Remove some useless ifdefs. 2012-10-14 23:22:16 +02:00
Themaister
b8abf34785 Purge some now useless code.
Removes manual input rate adjustments.
Don't allow DSP plugs to resample as it would complicate things alot
with dynamic rate control.
Also purges optional ssnes_* symbols for external plugs.
2012-10-13 20:22:45 +02:00
Themaister
254e711e2d Comment out spammy error message. 2012-09-25 13:33:11 +02:00
Themaister
c472688663 Do not segfault when snd_pcm_avail_update() fails. 2012-09-24 16:40:51 +02:00
Themaister
d4712d97c9 Fixup error checking in ALSA. 2012-09-14 21:41:58 +02:00
Themaister
82d726f6dd Add some diagnostics for ALSA. 2012-09-10 21:25:03 +02:00
Themaister
6a169513c9 Allow ~/ to be used in config for regular paths on *nix. 2012-09-07 22:20:49 +02:00
Themaister
29a1e7ac27 Purge some still lingering SSNES-isms. 2012-09-07 21:56:26 +02:00
twinaphex
eca2c09fdd (Xbox 1 RMenu) Add sound volume level setting 2012-08-22 16:59:12 +02:00
Themaister
2234073c2f Readding static to globals in dsound. 2012-08-17 23:20:08 +02:00
twinaphex
6a08c92ada (Xbox 1) Cut down on some static variables 2012-08-17 17:45:14 +02:00
Themaister
bfdb1615b5 Style nitting. 2012-07-25 04:50:46 +02:00
freakdave
64378ea072 (Xbox 1) Fixed low volume issue 2012-07-19 16:53:24 +02:00
twinaphex
c676341404 (Xbox 1) DirectSound works 2012-07-08 19:30:19 +03:00
Themaister
45481634f2 Add tests for fixed point sinc. 2012-07-06 17:04:54 +01:00
Themaister
7b12182a0f Add optional fixed point resampler. 2012-07-06 17:36:37 +02:00
TwinAphex51224
e4e7216b90 Revert rarch_stdint.h references 2012-06-24 21:55:36 +02:00
TwinAphex51224
d5bb5fd7af (Xbox 1)) Changes 2012-06-24 21:25:11 +02:00
Themaister
e5b3a61f9f Replace use of unsafe strtok() with strtok_r.
Implement compatibility for strtok_r() on Win32.
2012-06-24 02:37:19 +02:00
Themaister
acda9dea35 Forgot to commit null drivers ... 2012-06-20 00:44:40 +02:00
Themaister
2b712f5f46 Avoid ifdef. 2012-05-22 15:34:53 +02:00
Themaister
4debf60bad Do not output FFT sanity test to stdout. 2012-05-08 13:02:29 +02:00
Themaister
bc604f5029 Output SNR results to CSV. 2012-05-08 12:55:12 +02:00
Themaister
3878e81ce4 Improve SNR measurement. 2012-05-08 12:14:03 +02:00
Themaister
6b6e1556f6 Clean up ALSA plug a bit. 2012-04-25 19:49:56 +02:00
Themaister
b95b101a37 Add compat to external APIs. 2012-04-21 23:36:55 +02:00
Themaister
ce740f8948 More fixups. 2012-04-21 23:31:57 +02:00
Themaister
aab8fb6151 ssnes_* => rarch_*. 2012-04-21 23:25:32 +02:00
Themaister
9ab51ad23a SSNES => RetroArch. 2012-04-21 23:17:43 +02:00
Themaister
8fed2d1efb Should fix high CPU bug in Pulse. (Thanks to fable2012). 2012-04-18 20:30:32 +02:00
Themaister
00fd46c0f6 Style nit. 2012-04-18 20:19:58 +02:00
Themaister
9f0211d9d7 Fixup C++ build. 2012-04-09 22:30:29 +02:00
Themaister
e3a71a8c5b Fixup headers. 2012-04-09 22:05:26 +02:00
Themaister
62c96ea937 Change license header. 2012-04-09 22:03:57 +02:00
Themaister
9698cd7dbd Change headers. 2012-04-09 22:03:57 +02:00
Themaister
eca337ee55 Allow device to be selected in DirectSound. 2012-03-30 20:09:40 +02:00
Themaister
996d6d25b7 Add support to select device in XAudio2. 2012-03-30 19:53:12 +02:00
Themaister
36885e35d7 Kill obsolete test code. 2012-03-12 22:02:34 +01:00
Themaister
449b08e9d5 Fix warning. 2012-03-04 23:17:27 +01:00
TwinAphex51224
4b67a3c59e (PS3) Compiles in rsound now 2012-03-01 21:32:01 +01:00
Themaister
59dbc4727b Generate for rest of slide window. 2012-02-28 23:01:18 +01:00
Themaister
57e17d9b14 Optimize resampler some more. 2012-02-28 22:58:19 +01:00
Themaister
18aebfedc2 Test for IDFT. 2012-02-28 00:52:49 +01:00
Themaister
c8173aaf62 Calculate imaginary part correctly. 2012-02-28 00:29:45 +01:00
Themaister
c975145914 Use omega to report response. 2012-02-27 21:34:31 +01:00
Themaister
2fecfc7fca Drop phase measurement as they're kinda useless. 2012-02-27 21:13:50 +01:00
Themaister
24817543e0 Implement FFT for better SNR verification. 2012-02-27 19:49:00 +01:00
Themaister
afa6776b1d Add cutoff. 2012-02-26 19:18:51 +01:00
Themaister
9b4a91fd29 Add rate control to coreaudio. 2012-02-26 01:22:07 +01:00
Themaister
b4fe5198b3 Win32 doesn't have memalign ... 2012-02-25 22:37:40 +01:00
Themaister
37ed625bab Use shuffles/movehl. 2012-02-25 21:47:40 +01:00
Themaister
a5c47a568e Attempt to measure phase distortion as well. 2012-02-25 21:17:48 +01:00
Themaister
3dc5b21b78 Use lanzcos instead (better SNR). 2012-02-25 16:45:06 +01:00
Themaister
bdc8cd1cb1 Apply deltas to last phase as well. 2012-02-25 16:33:33 +01:00
Themaister
6643bf3e1c Use floating point for sample offsets. 2012-02-25 14:31:57 +01:00
Themaister
cd54cc6822 Improve SNR testing routines. 2012-02-25 14:02:56 +01:00
Themaister
5f330cbfa5 Fix printf format. 2012-02-25 01:50:08 +01:00
Themaister
9bad6f2bba Add resampler tests. 2012-02-25 01:47:23 +01:00
Themaister
0496ffc007 Optimize sinc resampler a bit. 2012-02-24 21:01:29 +01:00
Themaister
1ea4b5ce7c Fix build. 2012-02-23 23:57:35 +01:00
Themaister
f5a4ea55f5 Add sinc resampler. 2012-02-23 23:53:18 +01:00
Themaister
aecd9a1ecb Rename resampler functions to something more generic. 2012-02-23 23:22:08 +01:00
Themaister
341baf6918 If samplerate is not supported, do not fail. 2012-02-21 23:39:50 +01:00
Themaister
d68658b7fb Merge branch 'ratecontrol' 2012-02-20 18:40:07 +01:00
Themaister
c833a71d2c Rate control for Pulse and Jack. 2012-02-20 18:39:50 +01:00
Themaister
6f04c38fda Use larger fragsize for OSS. 2012-02-20 18:30:26 +01:00
Themaister
fe2134cb8c Fix warning. 2012-02-15 20:19:29 +01:00
Themaister
80372f54a6 Add rate control calls for more backends. 2012-02-14 16:58:13 +01:00
Themaister
a6a068e09e Add write_avail/buffer_size for XAudio. 2012-02-14 16:16:22 +01:00
Themaister
438ac4ca4b Begin adding rate control. 2012-02-14 01:16:37 +01:00
Themaister
9c861f13be Fix additional exclamation marks. 2012-02-11 21:16:01 +01:00
Themaister
b5f77bf65e Use sthread in rsound. 2012-01-28 00:34:06 +01:00
Themaister
f57ab1ccd8 Handle zero sized writes. 2012-01-14 02:03:49 +01:00
Themaister
b4248038fb Update license headers. 2012-01-08 01:12:05 +01:00
Themaister
884c113645 Cleanup stupid code. 2011-12-27 00:54:31 +01:00
Themaister
c5d1fd32d5 Deinit audio before video. 2011-12-25 19:31:05 +01:00
Themaister
0c8d85d589 Minor fixes. 2011-12-25 16:47:03 +01:00
Themaister
0c16e1a134 x64 build. 2011-12-25 16:36:56 +01:00
Themaister
eac468ba19 MSVC compat. 2011-12-25 01:38:59 +01:00
Themaister
18f407110b Fixup compatibility. 2011-12-24 20:43:58 +01:00
Themaister
d5fca50a2f Can build for C++. 2011-12-24 15:26:01 +01:00
Themaister
19c5eab07a Minor clean. 2011-12-04 01:30:16 +01:00
Themaister
e5286cbe39 Update XAudio for pure C. 2011-12-04 01:10:16 +01:00
Themaister
a7870aa888 Altivec sample conversion. 2011-12-02 01:34:02 +01:00
Themaister
a6f7a2311f Minor cleanups for hermite. 2011-11-03 23:48:36 +01:00
Themaister
4806d2fe88 Clear up inconsistencies, and avoid breaking standard compliance. 2011-11-02 20:04:31 +01:00
Themaister
0f010cf3d2 Fix style nits. 2011-11-02 19:31:36 +01:00
Themaister
77a2723bb0 Neat optimizations for SSE. 2011-10-23 02:56:33 +02:00
Themaister
41cd6e21c3 Use _mm* intrinsics. 2011-10-22 23:36:02 +02:00
Themaister
5d1d188231 Hardcode hermite for 2 channels. 2011-10-20 22:26:41 +02:00
Themaister
d7b3f39136 SSE2 optimized a bit :D 2011-10-15 18:09:44 +02:00
Themaister
5bcf601a40 Refactor out audio conversion. 2011-10-15 17:47:29 +02:00
Themaister
b2dd12d186 Rewind audio! :D 2011-10-15 14:33:41 +02:00
Themaister
f48247a18b Style nits ... 2011-10-15 12:56:48 +02:00
Themaister
48e015558e Style nits. 2011-10-15 12:54:47 +02:00
Themaister
cb140c3691 Update XAudio driver to use floating point. Nits here and there. 2011-08-21 19:27:11 +02:00
Themaister
071c03e194 Do not link XAudio2 dynamically. Build with MinGW. 2011-08-20 03:22:19 +02:00
Themaister
a76b25aff9 Fix ugly Jack crash with race condition. 2011-08-14 16:29:31 +02:00
Themaister
343852af26 Allocate before activation. 2011-08-14 16:24:42 +02:00
Themaister
b16ff3024c Add new DSP plugin API, events. 2011-08-13 04:09:08 +02:00
Themaister
5d9805c3e5 Small fix. 2011-08-09 22:07:11 +02:00
Themaister
b17617bed5 Updated copyrights. 2011-08-09 12:58:13 +02:00
Themaister
50579aaeea Floating point. 2011-08-08 17:45:49 +02:00
Themaister
38eb855b48 Works! :D 2011-08-08 17:41:55 +02:00
Themaister
12cc85c8a5 CoreAudio builds. 2011-08-08 17:31:03 +02:00
Themaister
14ae5e397a Add CoreAudio driver. Untested. 2011-08-08 17:27:52 +02:00
Themaister
dadd794ece Remove useless define. 2011-08-05 19:18:43 +02:00
Themaister
706a3738b5 Abandon POT buffer sizes only for dsound.
Allows more fine tuned latencies.
2011-08-05 19:17:33 +02:00
Themaister
9aef33aabd More fixups in DSound. 2011-08-05 14:01:58 +02:00
Themaister
ac4219bcde Small clarification. 2011-08-05 13:39:27 +02:00
Themaister
b337856f80 More extensive error checking in dsound. 2011-08-05 13:35:02 +02:00
Themaister
079a0100c0 Remove unneeded call. 2011-08-05 03:06:48 +02:00
Themaister
014c3c90e0 Fix possible race condition. 2011-08-05 02:57:30 +02:00
Themaister
4759e3411f Fix DSound up some more in Windows ... :D 2011-08-05 02:05:32 +02:00
Themaister
4a05e50636 Minor progress. But no audio, hrm. 2011-08-04 19:11:14 +02:00
Themaister
776291a137 Start working on DirectSound driver. Untested so far. 2011-08-04 18:45:40 +02:00
Themaister
f3cdb95b04 Fix endian issues in OSS driver. 2011-07-26 00:53:24 +02:00
Themaister
72fb694e97 Use pkg-config more where appropriate. 2011-06-25 17:15:58 +02:00
Themaister
75d1155a23 Fix OSS build for BSD. 2011-06-16 23:20:12 +02:00
Themaister
f761811189 Move buffer to top-level as it's not audio only. 2011-06-14 19:58:12 +02:00
Themaister
0e964c5cc2 More generic naming for FIFO buffer. 2011-06-14 19:55:08 +02:00
Themaister
8c1db1c407 Fix shenanigans. 2011-06-09 23:17:10 +02:00
Themaister
712f463022 Disable audio sync properly in external driver. 2011-06-06 02:01:21 +02:00
Themaister
713e8624a0 Fixed typo. 2011-06-05 22:23:50 +02:00
Themaister
44c52ca4f8 Add -pedantic for shits 'n giggles.
Fix portability issues with void* -> void (*)(void) casts.
Use a more ... bizarre technique ;)
2011-05-31 15:03:59 +02:00
Themaister
8bc3d3ac5c Add possibility for audio driver to override sample rate. 2011-05-23 14:04:31 +02:00
Themaister
70000607a2 Some EQ-ish stuff for lulz. 2011-05-21 20:09:43 +02:00
Themaister
c370cba5b5 Update config. 2011-05-17 19:37:05 +02:00
Themaister
24cb2e6844 Update filter a bit. Add a Makefile. 2011-05-17 19:34:24 +02:00
Themaister
7f1cd62c8a Update DSP API for config callback.
Clean up API a bit to have separate
SSNES_*_API_VERSION defines.
2011-05-17 19:20:41 +02:00
Themaister
aebe6bcd23 Add example SSE3-optimized IIR filter. 2011-05-17 02:45:10 +02:00
Themaister
6244671b04 Small API cleanup. 2011-05-15 15:57:47 +02:00
Themaister
b32224d406 Check for API mismatch. 2011-05-15 01:49:37 +02:00
Themaister
5d5865cfd8 Add external API for audio driver. 2011-05-15 01:46:11 +02:00
Themaister
4a78f2fef1 Add a clarifying comment. 2011-05-14 20:53:38 +02:00
Themaister
f10ed12b74 Fix doc bug. 2011-05-13 22:05:16 +02:00
Themaister
5ae4235545 Some fixes. 2011-05-13 21:19:05 +02:00
Themaister
8ceb8225ad DSP plugin interface, weeee :D 2011-05-13 21:05:28 +02:00
Themaister
78c457b996 Update Roar driver. 2011-03-11 19:23:32 +01:00
Themaister
f94dc125e5 An initial take on bsnes CPU filters. 2011-03-07 19:12:14 +01:00
Themaister
84b2b9c7a5 Fix up Jack deprecation. 2011-03-06 16:58:33 +01:00
Themaister
81e8368099 Update RSound to use callback locks. 2011-02-08 17:50:38 +01:00
Themaister
d0c10e7523 Use new callback interface for RSound. Fix when restarting audio driver
fails.
2011-02-06 23:55:17 +01:00
Themaister
91d2cea259 Make the hermite resampling core more robust. 2011-02-06 18:38:04 +01:00
Themaister
1b5e63f024 Add hermite resampler. 2011-02-06 12:57:12 +01:00
Themaister
57eebebcdd Fix OpenAL build for OSX. 2011-02-04 14:43:14 +01:00
Themaister
8ba639c7d5 Fix log message. 2011-01-29 23:23:54 +01:00
Themaister
fff7aba8ec Use threaded mainloop for Pulse. Seems to fix most issues. 2011-01-29 02:00:57 +01:00
Themaister
e83f3ed444 Initial PulseAudio code. 2011-01-29 01:15:09 +01:00
Themaister
334f11d5bc Add logging when XAudio fails. 2011-01-28 20:57:13 +01:00
Themaister
8c1ef3051d Add XAudio support. Need a separate xaudio-c.dll which actually implements the interface. 2011-01-27 01:57:25 +01:00
Themaister
2267c7d048 Update licensing headers. 2011-01-23 20:29:28 +01:00
Themaister
c7e6e73bcb Fix a blooper in headers. 2011-01-17 20:54:58 +01:00
Themaister
0a2f05561b Add in SW params again, seems like they were needed after all... :) 2011-01-15 21:11:22 +01:00
Themaister
5c9c4f42c3 Clean up float handling a bit.
ALSA now checks if floating point is supported to avoid one extra
conversion, also clean up the driver itself a bit.
2011-01-15 20:37:42 +01:00
Themaister
eceac31060 Some rework in Jack. Better buffer handling and should reach lower
latencies more stable.
2011-01-14 16:32:12 +01:00
Themaister
6b21e6b8a3 Clean up audio a bit. Less use of nasty statics and VLAs. 2011-01-14 15:34:38 +01:00
Themaister
580bffc218 Make latency detection more correct. 2011-01-07 20:37:30 +01:00
Themaister
35124dc288 Use the more portable "SDL.h" include convention for SDL. 2011-01-07 18:11:06 +01:00
Themaister
3d20fe70cd Add configurable latency (however, SDL will most likely ignore this
anyways.)
2011-01-07 16:11:48 +01:00
Themaister
a5bbc68a84 Add SDL audio driver. 2011-01-07 15:50:16 +01:00
Themaister
5f69145be2 Fix some issues with jack driver. 2011-01-01 04:50:35 +01:00