Commit Graph

171 Commits (eca73a810c19ed5cfb3f24cb5560d0735e19ea00)

Author SHA1 Message Date
Charles Pigott 1e529e1632
Fix: [Fluidsynth] Crash when debug output enabled (#9446) 3 years ago
rubidium42 eb6cdadc4d Codechange: replace IConsolePrintF with IConsolePrint and fmt formatting
Also make some strings more consistent with the rest of the console strings.
3 years ago
rubidium42 55a11710a6 Codechange: convert printf DEBUG statements to fmt Debug statements 3 years ago
milek7 886f5c104a Fix: Workarounds for BeMidi driver to work properly on Haiku 3 years ago
milek7 36bcd2956a Fix: Building on Haiku 3 years ago
Rubidium 79fc094c54 Cleanup: [Fluidsynth] Remove fluid_player_join
The function fluid_player_join in the library is broken beyond compare for the
usecases it was used for (see their #872). It does not wait until it is safe
to delete the player, so it is up to the end user to ensure that.

For OpenTTD we acquire a lock before fluid_synth_write_s16 and we acquire the
same lock in the stop function. So, only one of the functions can be doing its
thing, meaning we do not need to wait for the player to be stopped as it
cannot be doing anything as we prevent that by the lock.
3 years ago
rubidium42 a432009f06 Cleanup: [Fluidsynth] Comply better with the coding style 3 years ago
rubidium42 6bd7f8816d
Fix #9117, 04ce1f07: [Fluidsynth] Infinite wait when stopping song (#9181)
In FluidSynth 2.2.0 an extra state was added to denote stopping. To transition
from this state to a stopped state the rendering needs to be running. Since
04ce1f07 locking was added that skipped the rendering when something else held
a lock, so the state would never get to stopped and join would never return.
3 years ago
Loïc Guilloux 888389c28d
Codechange: Use std::string in console commands/aliases registration, and std::map instead our sorted linked list (#9057)
* Codechange: Use std::string in console commands and aliases registration

* Codechange: Use std::map to register console commands

* Codechange: Use std::map to register console aliases

* Cleanup: Remove now unused function
3 years ago
Ghislain Antony Vaillant e7cf589868 Fix: Honor default soundfont for FluidSynth
Debian now provides a default soundfont for FluidSynth via its alternatives system.

In short, FluidSynth is configured to look for `/usr/share/sounds/sf3/default-GM.sf3` as its default soundfont, and each soundfront package (FluidR3, OPL-3, MuseScore...) may provide or override this symlink. By default, FluidSynth is installed on Debian with the `TimGM6mb` soundfont by default due to its limited size.

See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=929185 for further details.
3 years ago
Ghislain Antony Vaillant 9725bd8dd0 Fix: Use FluidSynth default soundfont 3 years ago
Niels Martin Hansen e0561dbded Fix #8713: Change OTTD2FS and FS2OTTD to return string objects instead of static buffers 3 years ago
Milek7 33c5f984f5
Codechange: Use COINIT_MULTITHREADED in CoInitializeEx (#8938) 3 years ago
Niels Martin Hansen b427ddce88 Codechange: Switch to explicit wide strings 3 years ago
Niels Martin Hansen beeb9e0a1b Remove: [Win32] Last pretenses of being able to build for Windows 95 3 years ago
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 3 years ago
Michael Lutz 65f65ad2ad Codechange: Convert some more FIO functions to take std::string. 4 years ago
Michael Lutz f3326d34e7 Codechange: Use std::string in FIO search path handling. 4 years ago
Charles Pigott 348c231e12 Codechange: Make codestyle for CMake files consistent for 'control' statements 4 years ago
TechGeekNZ 716c883737 Fix: Globally apply preprocessor directive coding style
Global; except for the 32-bit SSE blitter, which has some #DEFINEs
in not-very-nice places.
4 years ago
Patric Stout 4d04009d12 Codechange: remove #ifdef from .cpp files to exclude features
With CMake, these files are simply not compiled to start with.
4 years ago
Patric Stout 56d54cf60e Add: introduce CMake for project management
CMake works on all our supported platforms, like MSVC, Mingw, GCC,
Clang, and many more. It allows for a single way of doing things,
so no longer we need shell scripts and vbs scripts to work on all
our supported platforms.

Additionally, CMake allows to generate project files for like MSVC,
KDevelop, etc.

This heavily reduces the lines of code we need to support multiple
platforms from a project perspective.

Addtiionally, this heavily improves our detection of libraries, etc.
4 years ago
Michael Lutz 37bc2f8064 Codechange: Use std::string in the driver and blitter selection code. 4 years ago
Niels Martin Hansen 2c84549db0 Fix: Two issues in MIDI file writer
Variable-length values would write threshold values with a byte too many.
System Exclusive messages would cause write to fail since the end byte was treated as part of next message.
4 years ago
Michael Lutz 4bfa3ff619 Remove: [OSX] Old QuickTime music driver. 4 years ago
Michael Lutz b17ea3de36 Remove: [OSX] Support for the pre-10.5 audio/music APIs. 4 years ago
Niels Martin Hansen 04ce1f0713 Fix #7885: [Fluidsynth] Use recommended method of setting sample rate 4 years ago
Milek7 41163331aa Fix: Silence all notes when stopping song in fluidsynth 4 years ago
Milek7 823333c4b0 Fix: correct checking of fluid_settings_setnum return code 4 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
Michael Lutz d5a9bd404a Codechange: [OSX] Use std::unique_ptr with a custom deleter to simply memory management of Core Foundation types. 5 years ago
Charles Pigott 3cc6b7f725 Fix: Signedness issue in midi driver 5 years ago
Charles Pigott 7b400d43c1 Codechange: Fix warning about discarding qualifiers by *really* casting the variable 5 years ago
Charles Pigott b839e355ba Fix: Compilation error on MinGW due to usage of C++17 template deduction 5 years ago
JMcKiern 04f659e768 Fix: Some typos found using codespell 5 years ago
Michael Lutz 316e4e9417 Fix: [OSX] Macro name conflict when trying to compile the QuickTime music driver. 5 years ago
Niels Martin Hansen a933afabfd Add: [Win32] Select MIDI device by port name 5 years ago
Niels Martin Hansen 1e723934a1 Fix 27384486e4: Error in GM Reset sysex data 5 years ago
Niels Martin Hansen a0c78c73e3 Fix: Correctly reset playback between songs in win32_m driver 5 years ago
Niels Martin Hansen 27b7c5a5fd Fix: Correctly reset playback between songs in DMusic driver 5 years ago
Niels Martin Hansen a4cf1c8aec Fix: Don't keep mutex locked while parsing MIDI data 5 years ago
Niels Martin Hansen 9839ce006c Fix: Time values should be DWORD everywhere in win32_m 5 years ago
Niels Martin Hansen f8633fc63b Codechange: Fix comment indentation 5 years ago
Niels Martin Hansen 27384486e4 Codechange: Use common source for well-known SysEx messages in Windows music drivers 5 years ago
Niels Martin Hansen 9d8a83bf8d Codechange: Add some const in preparation 5 years ago
Niels Martin Hansen c74df8581d Codechange: Use std::mutex instead of CRITICAL_SECTION in win32_m 5 years ago
glx 9184a62958 Codechange: replace grow() usage for MidiFile 5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
Michael Lutz ae748166d0 Codechange: Use platform independent C++11 function for sleeping on a thread. 5 years ago
Michael Lutz 05bc2ed7cb Codechange: Replace custom thread code with C++11 thread objects.
We assume a conforming C++11 compiler environment that has a valid <thread>-header.
Failure to run a real thread is handled gracefully.
5 years ago