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
9bfcea0397
Cleanup: [Fluidsynth] Comply better with the coding style
...
(cherry picked from commit a432009f06
)
3 years ago
rubidium42
e71798381b
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.
(cherry picked from commit 6bd7f8816d
)
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
Jonathan G Rennison
253772e9af
Merge branch 'master' into jgrpp
...
# Conflicts:
# CMakeLists.txt
# COMPILING.md
# src/console.cpp
# src/console_cmds.cpp
# src/console_internal.h
# src/rev.cpp.in
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
Jonathan G Rennison
227041008f
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/debug.cpp
# src/lang/russian.txt
# src/misc_gui.cpp
# src/os/windows/crashlog_win.cpp
# src/os/windows/font_win32.cpp
# src/os/windows/win32.cpp
# src/rail_cmd.cpp
# src/window_gui.h
3 years ago
Jonathan G Rennison
edfa04286b
Merge branch 'master' into jgrpp
...
# Conflicts:
# .github/workflows/release.yml
# bin/CMakeLists.txt
# src/dock_gui.cpp
# src/lang/brazilian_portuguese.txt
# src/lang/catalan.txt
# src/lang/czech.txt
# src/lang/dutch.txt
# src/lang/english.txt
# src/lang/english_US.txt
# src/lang/estonian.txt
# src/lang/finnish.txt
# src/lang/french.txt
# src/lang/german.txt
# src/lang/hungarian.txt
# src/lang/indonesian.txt
# src/lang/italian.txt
# src/lang/japanese.txt
# src/lang/korean.txt
# src/lang/lithuanian.txt
# src/lang/luxembourgish.txt
# src/lang/norwegian_bokmal.txt
# src/lang/polish.txt
# src/lang/portuguese.txt
# src/lang/romanian.txt
# src/lang/russian.txt
# src/lang/serbian.txt
# src/lang/simplified_chinese.txt
# src/lang/slovak.txt
# src/lang/spanish.txt
# src/lang/spanish_MX.txt
# src/lang/swedish.txt
# src/lang/tamil.txt
# src/lang/ukrainian.txt
# src/lang/vietnamese.txt
# src/newgrf.cpp
# src/newgrf_gui.cpp
# src/object_gui.cpp
# src/pathfinder/yapf/yapf_costrail.hpp
# src/pathfinder/yapf/yapf_node_rail.hpp
# src/rail_cmd.cpp
# src/roadveh_cmd.cpp
# src/town_cmd.cpp
# src/vehicle.cpp
# src/water_cmd.cpp
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
Jonathan G Rennison
f4e29071be
Merge tag '1.11.0-beta2' into jgrpp
...
# Conflicts:
# .github/workflows/ci-build.yml
# .github/workflows/release.yml
# CMakeLists.txt
# src/blitter/32bpp_optimized.cpp
# src/debug.cpp
# src/gfx.cpp
# src/gfx_func.h
# src/lang/czech.txt
# src/lang/english.txt
# src/lang/italian.txt
# src/lang/swedish.txt
# src/lang/ukrainian.txt
# src/network/network_server.cpp
# src/os/windows/crashlog_win.cpp
# src/os/windows/win32.cpp
# src/pathfinder/follow_track.hpp
# src/screenshot.cpp
# src/settings_type.h
# src/spritecache.cpp
# src/vehicle_gui.cpp
# src/video/sdl2_v.cpp
# src/video/video_driver.cpp
# src/video/video_driver.hpp
# src/video/win32_v.cpp
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
Jonathan G Rennison
b7ddd486cf
Merge branch 'master' into jgrpp
...
# Conflicts:
# cmake/CompileFlags.cmake
# src/aircraft_cmd.cpp
# src/blitter/32bpp_anim.cpp
# src/cargopacket.cpp
# src/cheat_gui.cpp
# src/company_cmd.cpp
# src/company_gui.cpp
# src/core/pool_func.hpp
# src/date.cpp
# src/economy.cpp
# src/error_gui.cpp
# src/ground_vehicle.cpp
# src/ground_vehicle.hpp
# src/group_gui.cpp
# src/industry_cmd.cpp
# src/lang/dutch.txt
# src/lang/french.txt
# src/lang/german.txt
# src/linkgraph/linkgraph_gui.cpp
# src/linkgraph/mcf.cpp
# src/network/network_content.cpp
# src/network/network_server.cpp
# src/network/network_udp.cpp
# src/newgrf_engine.cpp
# src/newgrf_station.cpp
# src/order_cmd.cpp
# src/order_gui.cpp
# src/pathfinder/follow_track.hpp
# src/pathfinder/yapf/yapf_common.hpp
# src/saveload/saveload.cpp
# src/settings_gui.cpp
# src/station_cmd.cpp
# src/station_kdtree.h
# src/string_func.h
# src/table/settings.ini
# src/tgp.cpp
# src/timetable_cmd.cpp
# src/timetable_gui.cpp
# src/toolbar_gui.cpp
# src/town_cmd.cpp
# src/train_cmd.cpp
# src/train_gui.cpp
# src/tree_gui.cpp
# src/tunnelbridge_cmd.cpp
# src/vehicle.cpp
# src/vehicle_gui.cpp
# src/video/sdl2_v.cpp
# src/video/sdl_v.cpp
# src/video/win32_v.cpp
# src/viewport.cpp
# src/viewport_sprite_sorter_sse4.cpp
# src/window.cpp
3 years ago
Jonathan G Rennison
6c3e5642f8
Merge branch 'master' into jgrpp
...
# Conflicts:
# cmake/CompileFlags.cmake
# src/crashlog.cpp
# src/fileio.cpp
# src/fileio_func.h
# src/fios_gui.cpp
# src/ini_load.cpp
# src/ini_type.h
# src/lang/english.txt
# src/lang/german.txt
# src/lang/korean.txt
# src/network/network_client.cpp
# src/order_base.h
# src/order_cmd.cpp
# src/os/windows/win32.cpp
# src/road_cmd.cpp
# src/saveload/saveload.cpp
# src/saveload/saveload.h
# src/settings.cpp
# src/station_cmd.cpp
# src/stdafx.h
# src/table/settings.ini
# src/tree_cmd.cpp
# src/tree_gui.cpp
# src/vehicle_base.h
# src/video/cocoa/cocoa_v.mm
# src/video/cocoa/event.mm
# src/video/cocoa/wnd_quartz.mm
# src/viewport.cpp
# src/widgets/tree_widget.h
3 years ago
Charles Pigott
9b800a96ed
Codechange: Remove min/max functions in favour of STL variants ( #8502 )
4 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
Jonathan G Rennison
d85a529f87
Merge branch 'master' into jgrpp
4 years ago
Charles Pigott
348c231e12
Codechange: Make codestyle for CMake files consistent for 'control' statements
4 years ago
Jonathan G Rennison
737ced9f50
Merge branch 'master' into jgrpp
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
TechGeekNZ
cf8ea74733
Update: Merge branch 'jgrpp_master_cmake' into jgrpp_cmake
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
Jonathan G Rennison
f8d6e781ba
Merge branch 'master' into jgrpp
...
# Conflicts:
# projects/openttd_vs140.vcxproj.filters
# projects/openttd_vs141.vcxproj.filters
# projects/openttd_vs142.vcxproj.filters
# src/base_consist.h
# src/company_base.h
# src/newgrf_config.cpp
# src/newgrf_config.h
# src/openttd.cpp
# src/saveload/saveload.cpp
# src/saveload/saveload.h
# src/saveload/station_sl.cpp
# src/settings.cpp
# src/signs_base.h
# src/string.cpp
# src/string_func.h
# src/table/misc_settings.ini
# src/table/settings.h.preamble
# src/town_cmd.cpp
# src/vehicle.cpp
# src/vehicle_cmd.cpp
# src/video/cocoa/cocoa_v.mm
# src/video/null_v.cpp
4 years ago
Michael Lutz
37bc2f8064
Codechange: Use std::string in the driver and blitter selection code.
4 years ago
Jonathan G Rennison
763a2826b6
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/gamelog.cpp
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
Jonathan G Rennison
74b6981d97
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/os/macosx/macos.mm
# src/video/cocoa/cocoa_v.mm
# src/video/cocoa/fullscreen.mm
# src/video/cocoa/wnd_quartz.mm
# src/video/cocoa/wnd_quickdraw.mm
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
Jonathan G Rennison
babe98cdb1
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/network/network_server.h
# src/pathfinder/yapf/yapf_road.cpp
# src/viewport.cpp
4 years ago
Niels Martin Hansen
04ce1f0713
Fix #7885 : [Fluidsynth] Use recommended method of setting sample rate
4 years ago
Jonathan G Rennison
dd99fd646d
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/base_station_base.h
# src/industry.h
# src/industry_cmd.cpp
# src/industry_gui.cpp
# src/lang/korean.txt
# src/os/macosx/crashlog_osx.cpp
# src/station_cmd.cpp
# src/town.h
# src/town_cmd.cpp
# src/town_gui.cpp
5 years ago
Milek7
41163331aa
Fix: Silence all notes when stopping song in fluidsynth
5 years ago
Milek7
823333c4b0
Fix: correct checking of fluid_settings_setnum return code
5 years ago
Jonathan G Rennison
cbdd9f84d8
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/console_gui.cpp
# src/lang/korean.txt
# src/video/sdl2_v.cpp
# src/video/sdl2_v.h
# src/window.cpp
# src/window_gui.h
5 years ago
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
5 years ago
Jonathan G Rennison
ca3c72438e
Merge branch 'master' into jgrpp
...
# Conflicts:
# Makefile.bundle.in
# src/os/macosx/string_osx.cpp
# src/station_cmd.cpp
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
Jonathan G Rennison
edfd378e93
Merge branch 'master' into jgrpp
...
# Conflicts:
# source.list
# src/blitter/32bpp_anim.cpp
# src/linkgraph/linkgraphjob.cpp
# src/order_cmd.cpp
# src/vehicle.cpp
# src/vehicle_type.h
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
Jonathan G Rennison
1f535915d1
Merge branch 'master' into jgrpp-nrt
...
# Conflicts:
# config.lib
# src/core/bitmath_func.hpp
# src/lang/korean.txt
# src/main_gui.cpp
# src/order_gui.cpp
# src/script/api/script_object.cpp
# src/station_cmd.cpp
# src/video/cocoa/wnd_quartz.mm
5 years ago
Niels Martin Hansen
a933afabfd
Add: [Win32] Select MIDI device by port name
5 years ago
Jonathan G Rennison
ddb6c2e6e3
Add MinGW std threads include to music/win32_m.cpp
...
Fix uses of std::lock_guard
5 years ago
Jonathan G Rennison
d3e0c3787f
Merge branch 'master' into jgrpp-nrt
...
Merge trunk multiple docks implementation
# Conflicts:
# docs/landscape_grid.html
# src/order_cmd.cpp
# src/pathfinder/npf/npf.cpp
# src/pathfinder/yapf/yapf_ship.cpp
# src/rail_cmd.cpp
# src/saveload/afterload.cpp
# src/saveload/oldloader_sl.cpp
# src/saveload/station_sl.cpp
# src/script/api/script_order.cpp
# src/ship_cmd.cpp
# src/station.cpp
# src/station_base.h
# src/station_cmd.cpp
# src/tunnelbridge_cmd.cpp
5 years ago
Jonathan G Rennison
dbc5f1baed
Merge branch 'master' into jgrpp-nrt
...
# Conflicts:
# src/fontcache.cpp
# src/game/game_text.cpp
# src/lang/korean.txt
# src/os/macosx/crashlog_osx.cpp
# src/os/windows/crashlog_win.cpp
# src/station_cmd.cpp
# src/viewport.cpp
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
Jonathan G Rennison
674732cd68
Merge: Codechange: Use null pointer literal instead of the NULL macro
5 years ago
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
5 years ago
Jonathan G Rennison
f887b12be2
Add 3rd party mingw-std-threads headers to fix MinGW compilation
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
Michael Lutz
05f4e73608
Codechange: Replace custom mutex code with C++11 mutex'es.
...
A conforming compiler with a valid <mutex>-header is expected.
Most parts of the code assume that locking a mutex will never fail unexpectedly,
which is generally true on all common platforms that don't just pretend to
be C++11. The use of condition variables in driver code is checked.
5 years ago
Niels Martin Hansen
df673e9b2c
Fix: Fluidsynth should not try to lock sample data in memory
5 years ago
glx22
66dd7c3879
Fix: MSVC warnings ( #7423 )
5 years ago
Henry Wilson
cc62f4163f
Cleanup: Remove unused size template parameters from SmallMap and Auto[Free|Delete]SmallVector
5 years ago
Henry Wilson
c01a2e2a81
Codechange: Removed SmallVector completely
5 years ago
Henry Wilson
ab711e6942
Codechange: Replaced SmallVector::[Begin|End]() with std alternatives
5 years ago
Henry Wilson
a0f36a50e6
Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back()
5 years ago
Henry Wilson
a690936ed7
Codechange: Replace SmallVector::Length() with std::vector::size()
5 years ago
Henry Wilson
af7d9020a1
Codechange: Use override specifer for overriding member declarations
...
This is a C++11 feature that allows the compiler to check that a virtual
member declaration overrides a base-class member with the same signature.
Also src/blitter/32bpp_anim_sse4.hpp +38 is no longer erroneously marked
as virtual despite being a template.
5 years ago
Patric Stout
aa350528df
Remove: libtimidity support (NOT timidity support)
...
libtimidity was introduced with the support for PSP. PSP has been
dropped almost a year ago, but this music driver was not. This
corrects that oversight.
timidity (via extmidi) still works fine. This purely removes the
libtimidity support, which was only really available for PSP.
5 years ago
Nikolas Nyby
8a6e03c4d2
Fix #7189 : Fluidsynth volume gain too high
5 years ago
Niels Martin Hansen
cb60a5e57f
Change: Fluidsynth music driver plays through mixer instead of own audio driver
6 years ago
Michael Lutz
05a93c121c
Fix: [OSX] Macro redefinition warning.
6 years ago
Charles Pigott
0c619b7c4b
Add: Fluidsynth music driver support (jmak)
6 years ago
Charles Pigott
f5b1115039
Doc: Lots and lots of doxymentation fixes
6 years ago
Charles Pigott
ca5b68145a
Fix #6839 : OLD_GM_DIR midi search path got lost ( #6900 )
6 years ago
Niels Martin Hansen
bb086f9240
Fix: Better "temp" path for decoded MPSMIDI files when source filename has no path separators
6 years ago
Niels Martin Hansen
560b01f307
Fix: Check the search paths for standard MIDI files
6 years ago
glx
a4eccd8076
Fix: dmusic compilation with MSYS2/MINGW
6 years ago
Charles Pigott
63898f61b0
Codechange: Rearrange struct packing defines and make MinGW use _Pragma pack style
6 years ago
Niels Martin Hansen
a1b7812c7e
Change: Improved looping of title song
6 years ago
Niels Martin Hansen
11a846e3d5
Change: Compensate for MIDI transmission time when skipping start of song
6 years ago
Niels Martin Hansen
276192f714
Change #6684 : Cutting point overrides for music base sets
...
This improves bad looping of title screen song from Windows TTD, and fixes
a long silence at the end of "Can't get there from here" from Windows TTD.
6 years ago
Niels Martin Hansen
a8080f14a9
Change: DOS music loading for non-Windows music drivers
6 years ago
Niels Martin Hansen
e2fa4b71c6
Feature: Console command to dump decoded music to .mid file
6 years ago
Niels Martin Hansen
2ae9df7248
Feature: Decoder for DOS version music
...
This is based on reverse-engineering the TTD DOS driver for General MIDI music.
6 years ago
Niels Martin Hansen
f946b3da56
Codechange: Pass a MusicSongInfo struct instead of bare filename to music drivers.
...
Preparation for later extending the info passed to music drivers.
6 years ago
Michael Lutz
ce51e54d26
Change: [Win32] Parse and load DLS files for the DirectMusic driver without relying on high-level functions.
6 years ago
Michael Lutz
255549250f
Change: [Win32] Replace the current high-level Direct Music driver with a low-level driver that directly works with MIDI data.
...
This allows using different music sources besides standard MIDI files on disk.
6 years ago