Commit Graph

246 Commits (jgrpp)

Author SHA1 Message Date
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 5 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
Niels Martin Hansen 52655b5849 Change: [Win32 MIDI] Reset pitch bend range controllers on song change
Some songs (at least one in OpenMSX) use the MIDI pitch bend range controllers
but don't reset these at the end. This causes all subsequent songs to sound
wrong.
6 years ago
Niels Martin Hansen 99a39c842c Change: [Win32 MIDI] Send Roland reverb control message like TTD DOS does 6 years ago
Niels Martin Hansen b902e01e10 Change #6685: Replace Win32 music driver with one not depending on MCI
MCI MIDI is poorly supported on newer versions of Windows and can cause large
delays at the beginning of tracks.

The new driver is based on a from-scratch reader for Standard MIDI Files. This
should be re-usable in other music drivers too, and can allow for finer control
of playback in general.

It also provides a better framework for reading MIDI data from other formats
than just SMF.
6 years ago
Patric Stout 85adde7485 Remove: PSP support 6 years ago
Patric Stout 17bd580630
Remove: NO_DEBUG_MESSAGES was only read and setting it broke compilation (#6703)
Given any speed issue cannot be attributed to checking for _debug_NNN_level, removing this is a safe action

This fixes #6652.
6 years ago
frosch b4b98e5165 (svn r27893) -Codechange: Use fallthrough attribute. (LordAro) 7 years ago
peter1138 a9a7abf26c (svn r27834) -Change: Parse extmidi command string for parameters to pass on. 7 years ago
michi_cc 94b3965989 (svn r27675) -Fix [FS#6502]: [OSX] Building with 10.11 or 10.12 SDKs. 8 years ago
michi_cc c83306391e (svn r27673) -Add: [Win32] Thread names for windows debuggers. 8 years ago
michi_cc 35b77450f8 (svn r27380) -Fix: [Win32] Compilation with MSVC2015. 9 years ago
rubidium d2357ec435 (svn r26556) -Codechange: use sources.list to tell a file shouldn't be built for a particular platform 10 years ago
rubidium b476086c39 (svn r26538) -Codechange: remove double accounting of the drivers 10 years ago
rubidium 9ed12b0f07 (svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL) 10 years ago
rubidium 0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 10 years ago
rubidium defda16eb6 (svn r26108) -Codechange: some coding style (whitespace) 11 years ago
rubidium 6996b441d9 (svn r26107) -Codechange/cleanup: remove some coding bloat and simplify the driver factory instatiations 11 years ago
michi_cc 23a5c6a8c8 (svn r25269) -Feature [FS#5552]: [Win32] Driver param for the DirectMusic driver to specify the ouput port to use. (Based on patch by gulikoza) 11 years ago
michi_cc a959f0c23e (svn r25268) -Codechange: [Win32] Simplify resource deallocation in case initializing the DirectMusic driver fails. 11 years ago
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 12 years ago
truebrain e1f04b89c3 (svn r23648) -Revert (r23646): partial revert; nobody has to know about my local changes and attempts 13 years ago
truebrain da8777d4e5 (svn r23646) -Fix [FS#4901]: rescan the Game Scripts when done downloading one. 13 years ago
rubidium 4d5dbf5170 (svn r22410) -Document: some more bits ;) 13 years ago
rubidium 21e4e7ce06 (svn r20427) -Revert (r20105): even though MCI has less problems with wrongly pitched songs than dmusic, it crashed instead. 14 years ago
frosch 4bd32799f1 (svn r20286) -Codechange: Unify end of doxygen comments. 14 years ago
frosch ed4f806f1d (svn r20283) -Codechange: Unify start of doygen comments. 14 years ago
terkhen 88ca183191 (svn r20239) -Doc: Give a common name to all fall throughs (FALL THROUGH). 14 years ago
rubidium b8487afe54 (svn r20192) -Cleanup: bye bye variables.h, bye bye VARDEF... you won't be missed :) 14 years ago
rubidium d4da257ff9 (svn r20105) -Revert (r20102) [FS#3938]: resetting DirectMusic completely, although working, causes a temporary freeze of OpenTTD. As MCI behaves better than DirectMusic that has become the default music driver; small delay between songs beats wrongly pitched/bad sounding songs 14 years ago
michi_cc 58f1470129 (svn r20104) -Fix: [Win32] The win32 MIDI driver might clip the start of a song. 14 years ago
rubidium 24fe1f41a5 (svn r20102) -Fix: OpenMSX music sounds odd after certain songs are played. Likely because the instruments weren't reset properly 14 years ago
michi_cc b3a707ae4b (svn r20024) -Codechange: Remove the need to link with dxguid.lib for windows. 14 years ago
glx 895e3c312a (svn r19822) -Fix (r19814): missing semicolon 14 years ago
rubidium 062dd0e24c (svn r19814) -Codechange: give some more unnamed enums a name, in case they consisted of unrelated values use static const (u)int 14 years ago
rubidium 9c6512ef9e (svn r19168) -Fix: under some circumstances timidity (via extmidi) would not shut down properly causing all kinds of trouble (e.g. blocked audio output). Try harder to shut down timidity and first shut down the music so shut down order is the inverse of initialisation order. Based on a patch by Jindřich Makovička. 14 years ago
rubidium 1217bb9411 (svn r19097) -Fix [FS#3610] (r10444): compilation error in the BeMidi driver (jrepan) 15 years ago
rubidium 82fc28f77f (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 15 years ago
rubidium b0f1fcbead (svn r18520) -Fix [FS#3272]: allegro doesn't like to work with extmidi; it causes 'random' (looks like a racing condition in allegro) crashes when songs are stopped. 15 years ago
smatz d63e729cf1 (svn r17875) -Change [FS#3272]: prefer extmidi over allegro midi and allegro over null driver 15 years ago
rubidium d0d4cd7b8a (svn r17788) -Fix [FS#3268] (r16702): don't fail hard when no soundcard could be detected; just fall back on the null-driver 15 years ago
rubidium c37029d5e1 (svn r17787) -Codechange: be a bit more verbose about while allegro failed with some actions. 15 years ago
michi_cc dffd1be12d (svn r17710) -Feature [FS#3223]: [OSX] Add a MIDI driver using Cocoa/CoreAudio. 15 years ago
rubidium e8ddf001c8 (svn r17570) -Fix: a number of Doxygen warnings about missing parameters, which were sometimes missing and sometimes just typos 15 years ago
rubidium bc5241600a (svn r17428) -Codechange: add a function to get the name of a driver 15 years ago
rubidium bc8e66c202 (svn r17336) -Codechange: move some os specific files into src/os/ 15 years ago
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 15 years ago
rubidium e3c7a77b40 (svn r16827) -Codechange: make OSX specific files include stdafx.h always as the first file. Also unify OSX specific stuff into osx_stdafx.h and remove unused includes. 15 years ago
rubidium c29afac0a7 (svn r16700) -Fix: if allegro fails to start or fails open a window or sound card fall back to another driver 15 years ago
alberth 2a2a9a27ba (svn r16464) -Codechange (r16422): Added a missing const_cast<> 15 years ago
rubidium 5f4eeee5f0 (svn r16221) -Change: support building 64 bits OSX binaries and add optional support for 64 bits binaries in OSX universal binaries. However, do not default to adding 64 bits binaries because benchmarking has shown that they are slower than the 32 bits binaries. 15 years ago
rubidium bee930f9b3 (svn r16024) -Codechange: harden string copying on places where it's possible 15 years ago
peter1138 6bf1a49475 (svn r16012) -Codechange: Code style clean up. 15 years ago
rubidium a4139d5693 (svn r15886) -Fix [FS#2770]: libtimidity cannot handle frees of NULL (in contrast of most other frees) 15 years ago
smatz 8585aa71ed (svn r15726) -Codechange: unify coding style for const pointers 15 years ago
rubidium b25a4f8231 (svn r15718) -Cleanup: apply some comment coding style on the rest of the sources too 15 years ago
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 16 years ago
rubidium 11da45ee55 (svn r14949) -Cleanup: pointer coding style 16 years ago
peter1138 020dbb180a (svn r14909) -Codechange: Remove global option for the extmidi driver and make it a driver parameter with the name cmd instead. This means if you have an "extmidi = ..." line in your config you must change it to "musicdriver = extmidi:cmd=...", in the [misc] section. 16 years ago
peter1138 6b6fd36050 (svn r14907) -Codechange: Remove 32 character limit from driver/blitter selection and parameters. 16 years ago
rubidium 34ddda1009 (svn r14632) -Add: support Allegro as midi backend. 16 years ago
skidd13 706dd0f86c (svn r14555) -Codechange: replace ttd_strlcat and ttd_strlcpy with strecat and strecpy where direct conversion is possible 16 years ago
rubidium 633b15caf3 (svn r14542) -Codechange: replace some sprintf with s[en]printf to make sure they will not overflow their buffers. 16 years ago
rubidium e7829c1a57 (svn r14414) -Fix: replace instances of strncpy with strecpy as strncpy doesn't guarantee the resulting string is '\0'-terminated. 16 years ago
glx 670eca936f (svn r13127) -Fix (r13122): of course WIN32_LEAN_AND_MEAN excludes too much stuff 16 years ago
glx 780db88e99 (svn r12972) -Fix (r12971): forgot to close a comment 16 years ago
rubidium d03994098b (svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description. 16 years ago
glx 013d7db19f (svn r12373) -Fix [FS#1849]: win32 music driver fails if path is too long (128 chars is too much for mci it seems), so retry using the short path name (8.3 style) if available 16 years ago
glx 1abd2bd700 (svn r12372) -Fix: win32 music driver fails if path contains non-latin chars 16 years ago
glx f8bae50bf5 (svn r12366) -Codechange: use MAX_PATH instead hardcoded value 16 years ago
rubidium 933aea42cb (svn r11842) -Fix: libtimidity.cpp did not compile anymore. 17 years ago
rubidium 3ca95f2a85 (svn r11839) -Codechange: move some variables from variables.h to a more logical location. 17 years ago
glx aa1d429d7f (svn r11826) -Fix (r10444): at least one instance of dmusic driver is needed for it to be registered and usable 17 years ago
rubidium a3ccdcea36 (svn r11777) -Codechange: split the string header and make do not include it when it's not necessary. 17 years ago
rubidium e5e75bd8f8 (svn r11719) -Codechange: split sound.h in a header with types and one with functions. 17 years ago
egladil 1d5010edf9 (svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way. 17 years ago
egladil cd5597dddf (svn r11389) -Fix [FS#1386]: Replace calls to deprecated API with newer ones and handle broken iconv declaration in OSX 10.5. 17 years ago
bjarni d5874fb186 (svn r11326) -Cleanup: [OSX] removed now unneeded includes and unreached conditional defines from some OSX specific files 17 years ago
rubidium b12785cf7c (svn r11154) -Fix [FS#1239]: MIDI failing to play under Windows 95, 98 and ME. 17 years ago
glx 1f7f4f6f62 (svn r11029) -Fix [FS#1164]: win32 midi doesn't stop when closing openttd 17 years ago
peter1138 e51d9d4fbd (svn r10472) -Fix (r10741): typos prevented compilation 17 years ago
peter1138 8b81cdd2a6 (svn r10471) -Codechange: implement driver probing priority so that 'preferred' drivers are loaded first 17 years ago
peter1138 b953493930 (svn r10446) -Codechange: Move extmidi's global data into its class. 17 years ago
peter1138 68c6add8cc (svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model. 17 years ago
belugas 607a55f4ec (svn r9662) -Documentation: Doxygen corrections and @file omissions 17 years ago
rubidium 36bb92ae24 (svn r9050) -Codechange: Foo(void) -> Foo() 17 years ago
Darkvater 1bbbbeeef1 (svn r8860) -Cleanup: some style changes, proper #endif comments, variable initialisation, WINCE ifdef and a vsprintf to vsnprintf change. 18 years ago
belugas a723770836 (svn r8853) -Cleanup: doxygen changes. Correct forgotten c files to cpp files with the @file tag as well as a few general comments style 18 years ago
Darkvater b260be6e2a (svn r8805) -Codechange (r8757): DO set eol-style and keywords on new files... 18 years ago
truelight ee9f17844d (svn r8757) -Add: added libtimidity music driver (it is a nice small library simular to timidity via extmidi)
[PSP] -Add: added PSP specific code for libtimidity. libtimidity code is based on the work of Turulo. Tnx a bunch!
18 years ago
Darkvater 4d4c1e0505 (svn r8691) -Cleanup: Some proper #endif comments for sound/music/video files, and a little elimination of magic numbers in Win32SoundStart 18 years ago
rubidium f35ed4bbc2 (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b. 18 years ago
KUDr e373ea7096 (svn r8033) [cpp] - Prepare for merge from branches/cpp (all .c files renamed to .cpp) 18 years ago
rubidium 66bbf336c6 (svn r7759) -Merge: makefile rewrite. This merge features:
- A proper ./configure, so everything needs to be configured only once, not for every make.
 - Usage of makedepend when available. This greatly reduces the time needed for generating the dependencies.
 - A generator for all project files. There is a single file with sources, which is used to generate Makefiles and the project files for MSVC.
 - Proper support for OSX universal binaries.
 - Object files for non-MSVC compiles are also placed in separate directories, making is faster to switch between debug and release compiles and it does not touch the directory with the source files.
 - Functionality to make a bundle of all needed files for for example a nightly or distribution of a binary with all needed GRFs and language files.

Note: as this merge moves almost all files, it is recommended to make a backup of your working copy before updating your working copy.
18 years ago