Commit Graph

211 Commits

Author SHA1 Message Date
Lior Halphon 9ff3bffddd Fix thread assertion in GB_set_sample_rate, should make GB_set_clock_multiplier thread-safe. Fix missing memset. 2024-11-30 00:10:46 +02:00
Lior Halphon a39b1913b8 Much thread, very safety 2024-11-23 16:23:08 +02:00
Lior Halphon a0c5b6f97a Various optimizations 2024-11-23 00:16:42 +02:00
Lior Halphon 7e071e463d Improve band-limited synth 2024-11-21 21:12:30 +02:00
Lior Halphon 8f9e1e9ea5 Prevent certain APIs from returning 0 despite failing 2024-11-21 17:51:27 +02:00
Lior Halphon 101e894314 Fixed a rounding error when applying the high-pass filter on high sample rate 2024-11-16 13:59:38 +02:00
Lior Halphon 2e6ff5fd9f Disable filtering on raw audio output 2024-11-16 12:31:45 +02:00
Lior Halphon 2b3ec9d991 Missing nounroll 2024-11-16 02:23:11 +02:00
Lior Halphon 375fb4388c Swap the box filter with band-limited synthesis, fixed a regression that prevented filtering of square waves in some scenarios. Fixes #669 2024-11-16 01:03:14 +02:00
Lior Halphon d07b199668 Improve audio anti-aliasing, allow 2MHz output 2024-06-23 20:10:22 +03:00
Lior Halphon ad5ca0dcf0 Switch to 2MHz units in apu_cycles 2024-06-23 15:23:29 +03:00
Lior Halphon 322f3c7013 More accurate emulation of the previous quirk 2024-06-03 22:04:17 +03:00
Lior Halphon 5be5bc4709 Emulate a new APU glitch, tweak another. Fixes #617 (Telefang sample audio being broken on CGB-D and CGB-E) 2024-06-03 00:19:26 +03:00
Lior Halphon 8739da61c0 Avoid strict aliasing violations. Closes #593 2024-03-09 15:41:07 +02:00
Lior Halphon 6e923645d3 The previous change should only affect channel 3 2023-12-15 20:52:24 +02:00
Lior Halphon c7c2d08dc5 More accurate audio mixing in AGB mode, fixes #555 2023-12-15 20:38:19 +02:00
Lior Halphon ecbdb9e95e Emulate several more pre-CGB-D channel 1 glitches 2023-11-25 21:24:46 +02:00
Lior Halphon e59bc436bd CGB-C NR10 conflict improvements 2023-09-25 23:35:26 +03:00
Lior Halphon 340d4e0630 WIP: Fix APU regressions (CGB-D/E only so far) 2023-09-09 23:54:01 +03:00
Lior Halphon d662407df0 Accurate emulation of NR10 write glitches 2023-09-03 15:54:37 +03:00
Lior Halphon 1b50856dcf More of the same 2023-06-21 21:49:23 +03:00
Lior Halphon 207851bc56 Merge branch 'master' of github.com:LIJI32/SameBoy 2023-06-21 21:47:45 +03:00
Lior Halphon 57b50cab63 Work around bad Clang and GCC optimizations of inline compile-time consts (They can't be static before C23, which isn't supported by Clang) 2023-06-21 21:47:30 +03:00
Noah Sweilem 074d152a4e Formatting fixes 2023-06-20 10:28:18 -07:00
Noah Sweilem dad9e4b704 Formatting fixes 2023-06-20 10:28:01 -07:00
Noah Sweilem 9148b26bd8 Move `edge_triggered` variables into `gb->apu_output` 2023-06-20 10:25:25 -07:00
Noah Sweilem 4213524286 Fix swapped wave channel volume 2023-06-16 19:04:12 -07:00
Noah Sweilem ae855d470d Use different sample index for square channel edge trigger depending on duty cycle 2023-06-11 16:23:26 -07:00
Noah Sweilem ec9536eede Try a modified edge trigger detection for pulse and wave channels 2023-06-11 15:44:28 -07:00
Noah Sweilem 7bdf8dbe47 Add initial edge trigger detection method
- GB_get_channel_edge_triggered()
2023-06-11 15:27:31 -07:00
Noah Sweilem 5c7b1f01a3 Add som APU query methods for libsameboy
- GB_get_channel_volume()
- GB_get_channel_amplitude()
- GB_get_channel_period()
- GB_get_apu_wave_table()
2023-06-10 14:23:15 -07:00
Lior Halphon bed26daf73 Allow disabling SameBoy features when compiling as a library. Probably introduces some speed improvements to the Libretro core, as well as bsnes and BizHawk 2023-06-03 22:37:42 +03:00
Lior Halphon aa8b7b0c03 Improved emulation of envelope locking, fixes #522 2023-01-10 01:19:07 +02:00
Lior Halphon 14c4548325 Allow muting audio channels (Missing: SDL) 2022-09-11 15:53:07 +03:00
Lior Halphon 7917984376 Comments 2022-09-11 15:31:05 +03:00
Lior Halphon c368c77d28 Use names for LCDC bits 2022-08-28 20:31:50 +03:00
Lior Halphon 9bf7e0b4df More accurate sample repeat glitch, fixes #483 2022-08-14 17:43:28 +03:00
Lior Halphon 95773b9538 Make things const 2022-08-14 01:54:28 +03:00
Lior Halphon dbd33684e8 Missed some switches 2022-07-24 14:34:32 +03:00
Lior Halphon 58df8144ec Fix audio artifacts in the SGB jingle 2022-06-25 01:44:50 +03:00
Lior Halphon 6055092249 Add audio recording APIs 2022-05-21 02:06:10 +03:00
Lior Halphon 706135113c Fix AGB APU regression 2022-05-19 20:59:48 +03:00
Lior Halphon 9fe965bcc2 Fix skipped square tick when writing to NR13/23, fixes Telefang start screen audio on CGB-D and E 2022-03-12 15:38:05 +02:00
Lior Halphon ef15c9b160 More square zombie step quirks 2022-03-12 14:32:16 +02:00
Lior Halphon ab109da683 Fix several square channel zombie stepping quirks 2022-03-12 00:49:43 +02:00
Lior Halphon 4d74719d56 One day I'll just report that bug to Clang 2022-02-23 20:40:10 +02:00
Lior Halphon f52152b2c9 Fix the Preserve Waveforms setting 2022-02-23 20:34:50 +02:00
Lior Halphon a4209b47d0 Be consistent with hex casing 2022-02-13 16:58:44 +02:00
Lior Halphon a7f7530eed Preparation for future AGB-0 and B support 2022-01-30 18:11:35 +02:00
Lior Halphon 56b14c67aa Fixed AGB audio regression 2022-01-22 01:11:23 +02:00