Commit graph

27 commits

Author SHA1 Message Date
graham sanderson
368a6210f7 squashed rp2040-doom changes 2022-03-07 12:44:30 -06:00
Simon Howard
3bde136c60 opl: Use SDL_mixer post-mix hook for OPL output.
Using Mix_HookMusic() to generate the OPL output stream works fine if
you only ever play OPL music and don't want to use the normal music
output functionality of SDL_mixer. However, now that it's possible to
use substitute music packs with any music output type, this is no longer
the case. Using Mix_HookMusic() disables normal output from eg. Ogg and
FLAC playback. As an alternative, use the post-mix hook and mix the
output from the OPL emulator there.

Cleanup fix as part of #440.
2018-10-24 20:03:34 -04:00
Fabian Greffrath
4ff554629f opl_sdl.c: remove unused variable "i" 2016-04-25 20:48:17 +02:00
nukeykt
166c3d2e9b opl: Fix tab characters 2016-02-28 21:59:12 +09:00
nukeykt
eb3cd65176 opl: Nuked OPL3 v1.7
Reformat the OPL3 code.
Remove the DBOPL core.
The OPL3 chip write delay implementation.
2016-02-28 21:53:03 +09:00
nukeykt
e25368ca6b opl:Nuked OPL emulator 2016-02-11 20:49:48 +09:00
Simon Howard
6b00568544 Fix tab character. 2015-05-30 13:06:47 -04:00
Nuke.YKT
1e516e3491 Text formatting. 2015-05-29 17:30:12 +09:00
Nuke.YKT
7c377fc88a Added OPL3 mode support. 2015-05-29 02:00:45 +09:00
Simon Howard
e4d9b85aa4 opl: Use uint64_t for microsecond times.
Previous revamping of the OPL library changed delay times from ms
to us, and switched to 64-bit times for storage for them. However
this type change was botched and some functions were still using
32-bit arguments. Change to 64-bit types.

Thanks Quasar for reporting this. This fixes #438.
2014-10-07 22:47:29 -04:00
Simon Howard
72ce424207 opl: Change library to use us instead of ms.
Multi-track MIDI files are played back using separate callback chains
for each track, and this introduces the possibility of one track
becoming out of sync with the others. This was noticeable in WADs
that use multi-track MIDIs, such as Alien Vendetta. Increase the
timing resolution to microsecond precision to fix this.
2014-05-11 00:14:04 -04:00
Simon Howard
495694da29 opl: Add API to adjust tempo.
When the tempo is changed, the times on all active timers must be
adjusted to match the new timing values. Add an API to do this and
invoke it when a tempo change meta event is read.
2014-05-10 14:00:41 -04:00
Simon Howard
7684ddcfd8 Clean up file headers.
This change rewrites and simplifies the copyright headers at the top
of all source files:

 * Remove "Emacs style mode select" line; this line was included in
   the headers for the originally released source files and appears
   to be to set the file type for old versions of Emacs. I'm not sure
   entirely why it was required but I don't think it is any more.
 * Remove "You should have received a copy of..." text from copyright
   header. This refers to the old 59 Temple Place address where the
   FSF headquarters used to be located and is no longer correct.
   Rather than change to the new address, just remove the paragraph
   as it is superfluous anyway. This fixes #311.
 * Remove ---- separator lines so that the file headers are barer
   and more simplified.
2014-05-05 00:20:54 -04:00
Simon Howard
c53762058b Don't double OPL sample values, as it causes horrible things to happen
with the Heretic title screen music.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1988
2010-08-31 19:59:24 +00:00
Simon Howard
60226b1183 Fix volume multiply; DBOPL now generating output.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1957
2010-08-15 15:23:28 +00:00
Simon Howard
578a06c798 Hook DBOPL into OPL library and remove FMOPL. Does not generate any
sound yet.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1956
2010-08-15 14:57:37 +00:00
Simon Howard
a8e7930856 Change GetSliceSize() to always return a power of two.
Subversion-branch: /branches/opl-branch
Subversion-revision: 1724
2009-10-17 22:45:22 +00:00
Simon Howard
e30325c40f Add OPL library API function to set software emulation sample rate, and
set from snd_samplerate in the configuration file.

Subversion-branch: /branches/opl-branch
Subversion-revision: 1723
2009-10-17 22:36:15 +00:00
Simon Howard
073e710f68 Use Mix_HookMusic rather than Mix_SetPostMix for OPL emulation, to avoid
conflict with PC speaker emulation.

Subversion-branch: /branches/opl-branch
Subversion-revision: 1706
2009-10-03 22:43:07 +00:00
Simon Howard
4a70f989d2 Convert to American English spellings.
Subversion-branch: /branches/opl-branch
Subversion-revision: 1700
2009-10-01 00:08:48 +00:00
Simon Howard
79698ecfd9 Implement pausing of music.
Subversion-branch: /branches/opl-branch
Subversion-revision: 1688
2009-09-21 22:20:33 +00:00
Simon Howard
076adeb0aa Add method to clear all existing callbacks.
Subversion-branch: /branches/opl-branch
Subversion-revision: 1642
2009-08-30 12:07:04 +00:00
Simon Howard
6cae0f05cf Don't crash if OPL is shutdown after SDL was initialised.
Subversion-branch: /branches/opl-branch
Subversion-revision: 1635
2009-08-29 21:03:24 +00:00
Simon Howard
ca065a06ca Set timer callback for OPL emulator so that the adlib detection routine
works.

Subversion-branch: /branches/opl-branch
Subversion-revision: 1633
2009-08-29 20:08:21 +00:00
Simon Howard
e33a496133 Working SDL OPL driver.
Subversion-branch: /branches/opl-branch
Subversion-revision: 1632
2009-08-28 18:04:04 +00:00
Simon Howard
98ee23f426 Add initial callback/timer API.
Subversion-branch: /branches/opl-branch
Subversion-revision: 1538
2009-05-30 23:24:11 +00:00
Simon Howard
a4695f20fb Add initial SDL driver.
Subversion-branch: /branches/opl-branch
Subversion-revision: 1534
2009-05-27 18:01:00 +00:00