Commit graph

19 commits

Author SHA1 Message Date
Christoph Oelckers
dcef3681d4 - cleaned up the includes in timidity.cpp. 2019-09-24 23:12:38 +02:00
Christoph Oelckers
d557f609cf - cleanup of the TimidityMIDIDevice(GUS) backend code to eliminate the storage in global variables and to remove the dependencies on core ZDoom code.
The organization here is now the same as for the Timidity++ device, i.e. it is the device owning the instruments to give better control over their lifecycle.
2019-09-24 23:08:56 +02:00
Christoph Oelckers
fea0f77905 - removed some ZDoomd dependencies from Timidity(GUS) backend
* use std::string instead of FString
* replaced the single use of clamp with std::min/std::max.
* copied MAKE_ID macro into the source.
* use snprintf instead of mysnprintf
* use std::runtime_error instead of I_Error to abort on failed memory allocations.
2019-09-24 11:07:32 +02:00
Christoph Oelckers
cf6d0c3127 - implemented an abstract sound font reader interface for Timidity++.
The only dependency left on the main GZDoom code are the CVars, which will be dealt with next.
2019-09-23 13:53:28 +02:00
alexey.lysiuk
a3554bda70 - replaced all usages of insecure vsprintf() function 2019-03-04 17:35:38 +02:00
Christoph Oelckers
f6a91e1722 - moved the I_Error prototypes to doomerrors.h to avoid having to include the low level system header for this. 2019-01-31 19:38:04 +01:00
alexey.lysiuk
f17f8c9359 - added end line to various messages
so they don't screw up further output anymore
2018-05-11 18:03:57 +03:00
Christoph Oelckers
7c333b1fd1 - changed the default settings for fluid_patchset, timidity_config and midi_config to point to the default sound font.
wildmidi_config has not been changed because it cannot read .sf2 files.
2018-03-26 20:43:44 +02:00
Christoph Oelckers
b939836846 - renamed FileRdr back to FileReader. 2018-03-11 19:29:37 +01:00
Christoph Oelckers
56991a9ace - Removed FileReader from SoundFont manager.
- renamed close_file to tf_close for consistency.
2018-03-10 20:10:17 +01:00
Christoph Oelckers
26e948357e - added an abstract FileReader wrapper.
The idea here is to decouple the actual reader creation from the code using them so that, for example, the Open function can decide if it wants to open the file regularly or memory mapped and return different readers as deemed useful. For that to work the exposed object needs to be an abstract wrapper so that this can be done without having to use pointers and all the drawbacks coming from that.
So far put to use in a few parts of the music code so the general functionality could be tested.
2018-03-10 13:46:35 +01:00
Christoph Oelckers
eb124f6160 - made the sound font loading a bit more error resistant.
- implemented a fallback both for sound font lookup and for MIDI device selection so that if some non-working combination is set up, the player will fall back to something that works.
2018-02-26 16:36:30 +01:00
alexey.lysiuk
6bc2be1ca4 Fixed GCC 6+ compilation error
In file included from /usr/include/c++/6/math.h:36:0,
                 from src/vectors.h:43,
                 from src/sound/i_soundinternal.h:7,
                 from src/sound/i_sound.h:39,
                 from src/sound/i_musicinterns.h:5,
                 from src/sound/timidity/timidity.cpp:36:
/usr/include/c++/6/cmath:407:11: error: ‘::pow’ has not been declared
2018-02-26 14:46:24 +02:00
Christoph Oelckers
d6fe1fb39f - simplified the sound font manager a bit.
- allow the GUS to change sound fonts at run time.
- implemented sound font manager support in the GUS synth. This works but also made me realize that the SF2 support of this synth has been rather broken, apparently forever.
2018-02-23 00:48:03 +01:00
Christoph Oelckers
c12c068355 - WildMidi now uses the soundfont manager.
- added the missing handler for reading Timidity configs from the lump directory.
- fixed incomplete init of the GUS synth when no soundfont can be located.
- fixed bad initialization of WildMidi sampling frequency. It would default to 11.025 kHz if no valid rate was set. Now it will use the sound device's native frequency.
2018-02-22 22:35:49 +01:00
Christoph Oelckers
8b8a7e5e45 - sfmanager gets initialized 2018-02-22 14:30:43 +01:00
Christoph Oelckers
0688d53ea8 - allow reloading the sound font for the GUS device. 2018-02-21 23:38:04 +01:00
Christoph Oelckers
fb12c58533 - restart the music if the OPL core or the config file for the softsynths is changed, except for the GUS synth, which loads all its data during engine startup and cannot swap it out.
- added arrays to the config to hold entries for the softsynths' config files. This is not active yet, but will later be used to give the user a list of config options instead of having to type it by hand.
2017-04-18 16:43:07 +02:00
Christoph Oelckers
0b645dc42d - reorganized sound related code. 2017-03-10 20:53:03 +01:00
Renamed from src/timidity/timidity.cpp (Browse further)