8 Commits

Author SHA1 Message Date
jpernst
d931f75d93
Activate OPL3 chips on-demand based on voice pressure (#1911)
* Remove opl_sample_rate variable since it has no practical effect

* Deactivate idle OPL chips
Allocate free OPL voices from active chips before inactive ones

* Add comments for new constants

* Ensure OPL chip LFOs are kept in sync after dormancy

* Check for chip activations before sample generation to preserve sync
2024-09-17 07:47:29 +02:00
jpernst
3bee945f2f
OPL3 Improvements (#1907)
* Use correct OPL3 channel polarity by default

* Support multiple OPL3 chips

* Use native OPL sample rate and allow OpenAL to resample it

* Bind DMX OPL stereo correction to a config variable; default to vanilla

* Consolidate num_opl_chips variables; remove menu item
Use BETWEEN macro for mix clamping

* Disable upper register banks when dmx is in OPL2 mode
2024-09-15 12:18:56 +07:00
Roman Fomin
26ce44b216
remove extern from *.c files (#1686) 2024-05-13 16:43:07 +07:00
Roman Fomin
7bc4f24c7c
fix Thread Sanitizer warnings, music modules refactoring (#1531)
* Fix TSan warnings with Fluidsynth backend

* Convert Fluidsynth and OPL modules to stream_module_t interface

* Remove mutexes from OPL module

* Remove I_OAL_HookMusic/callback

* Move extern declarations to headers
2024-03-01 18:22:04 +07:00
Roman Fomin
a6836b314f
header cleanup using IWYU tool (#1467)
* Forward declaration of structures in headers where possible

* Use M_snprinf instead of sprintf

* Remove D_INTMAX D_INTMIN

* Don't change libtextscreen files

* Add miniz and win32 include directories
2024-02-20 19:26:28 +07:00
Roman Fomin
000bcd5e72
implement M_getenv for compatibility with non-Latin paths on Windows (#667)
* implement M_getenv for compatibility with non-Latin paths on Windows

* use regular wcslen

SDL_wcslen is undocumented

* fix memory leak

* cache the `wenv == NULL` case
2022-07-18 21:07:33 +07:00
Fabian Greffrath
c8b2fbd531
remove native OPL access implementations (#262) 2021-09-01 08:37:54 +02:00
Fabian Greffrath
3af836ec2e
add OPL emulation from Chocolate Doom (#258)
* add OPL emulation from Chocolate Doom

* get rid of detect_voices

* split the SDL music backend into a separate source file

* add post-realloc() check

* add OPL emulation copyright holders

* add some minimal comments

* add config variable and menu item

* sacrifice PCX format screenshot menu entry
2021-08-25 14:31:12 +02:00