Commit Graph

18 Commits

Author SHA1 Message Date
scawful
a582210fa8 feat(emu): implement SDL audio stream support in emulator
- Added functionality to enable SDL audio streaming in the Emulator class, allowing for improved audio handling.
- Introduced environment variable checks to configure audio streaming on initialization.
- Updated audio backend to support native audio frame queuing and resampling, enhancing audio performance and flexibility.

Benefits:
- Enhances audio playback quality and responsiveness in the emulator.
- Provides users with the option to utilize SDL audio streaming for better audio management.
2025-10-13 14:26:33 -04:00
scawful
0808c52788 refactor(audio): enhance audio buffering and interpolation methods
- Updated audio buffering strategy to ensure smooth playback by always queuing samples and implementing dynamic rate control.
- Introduced Hermite interpolation for audio resampling, providing better quality than linear interpolation.
- Adjusted audio debug logging for improved monitoring of audio states and buffer management.

Benefits:
- Improved audio playback quality and reduced glitches.
- Enhanced clarity in audio debugging and monitoring processes.
2025-10-11 23:47:17 -04:00
scawful
9ffb7803f5 refactor(emulator): enhance input handling and audio resampling features
- Renamed `turbo_mode()` to `is_turbo_mode()` for clarity in the Emulator class.
- Improved input handling in the Snes class by adding button state management and ensuring proper initialization of input controllers.
- Implemented multiple audio resampling methods (linear, cosine, cubic) in the Dsp class, allowing for enhanced audio quality during playback.
- Updated the user interface to include options for selecting audio interpolation methods and added keyboard shortcuts for emulator controls.

Benefits:
- Improved code readability and maintainability through clearer method naming and structured input management.
- Enhanced audio playback quality with new resampling techniques.
- Streamlined user experience with added UI features for audio settings and keyboard shortcuts.
2025-10-11 13:56:49 -04:00
scawful
88a4f29fe8 refactor(emulator): improve audio backend initialization and adaptive buffering
- Enhanced audio backend initialization by adding comments for clarity and ensuring a moderate buffer size for optimal latency and stability.
- Updated the emulator's run logic to start in a running state by default and refined the auto-pause mechanism to only trigger during window resizing, removing aggressive focus-based pausing.
- Implemented adaptive audio buffering to maintain smooth playback, adjusting the number of queued samples based on current buffer status.

Benefits:
- Improved user experience with more intuitive audio handling and reduced latency.
- Enhanced stability during window operations, preventing crashes on macOS.
- Streamlined audio processing for better performance and responsiveness.
2025-10-11 13:17:14 -04:00
scawful
a881c0f8e1 feat: Refactor Emulator to Accept ROM Parameter and Enhance Logging
- Updated Emulator::Run method to accept a Rom* parameter, improving flexibility in ROM handling.
- Refactored texture creation and ROM data initialization to utilize the new parameter.
- Enhanced logging in Snes class to provide detailed information during initialization, reset, and frame processing, aiding in debugging and performance monitoring.
- Introduced cycle tracking in Apu and Spc700 classes for accurate synchronization and debugging.
- Added unit tests for APU DSP functionality and IPL ROM handshake to ensure reliability and correctness of audio processing.
2025-10-06 11:41:33 -04:00
scawful
c8883a1e54 Remove unused includes and clean up header files 2025-01-16 03:44:37 -05:00
scawful
f48cd171e1 Remove unused audio namespace and clean up includes in APU and DSP files 2024-12-30 07:49:46 -05:00
scawful
e05e7c35db remove app namespace 2024-12-28 21:28:51 -05:00
scawful
66922ccd7f Add Dsp last frame boundary 2024-04-24 23:35:07 -04:00
scawful
d5e22cc430 include <cstring> for dsp memset 2024-04-24 10:15:17 -04:00
scawful
05df364ecb Remove AudioRam in favor of standard std::vector for spc700/dsp 2024-04-24 10:08:57 -04:00
scawful
9ecdfd2048 Add Dsp::Reset 2024-04-23 14:06:35 -04:00
scawful
3eb245f985 Add DspChannel and implement the Digital Signal Processor 2024-04-22 15:53:47 -04:00
scawful
e89d768b5a Add Dsp::GetSamples and cleanup Apu 2024-04-20 08:09:43 -04:00
scawful
ad08d998b5 Add audio namespace inside of emu 2024-04-13 23:32:30 -05:00
scawful
5a4ecc5b20 PPU upgrades, move Memory to own dir 2023-08-27 15:24:27 -04:00
scawful
a2de3c2ffe SPC700 to get notified when ports are written 2023-08-26 02:33:19 -04:00
scawful
3d793c452d Reorganize emu folder, update S-SMP system infra 2023-08-26 01:59:57 -04:00