This was done after the players had already been created. To ensure that everything gets set properly it is necessary to pass the desired sample rate to the device's constructor and let it make sure that a proper sample rate gets set.
- 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.
This reverts commit 8f7a503561.
# Conflicts:
# src/sound/timiditypp/playmidi.cpp
Something in here wasn't working as intended, and since it needs better synchronization let's redo it entirely.
This may cause problems because the player runs in a different thread than the input code.
Instead the play thread will now copy their values to local variables when it starts generating output.
- final tweak to volume adjustment: Do this upon extraction for better results.
If this is done via the synth's parameters it will affect channel balance.
The given factor of 5 is necessary to roughly match the output of FluidSynth.
* do not use the global temp directory. Instead create one in the AppData folder.
* removed lots of unneeded code from tmpfileplus.
* use C++ strings in there.
This prevents Timidity++ from playing externally, so it now always goes through
the sound system. Aside from the issues relating to controlling playback, that
functionality has been busted for who knows how long anyway since Open() always
tries to create a pipe and sound stream regardless of the calculated size.
Rather than building a command line that's going to be manually split into
individual arguments passed to execvp, build the individual arguments directly.
For non-Windows systems, read() may be non-blocking and can return less than
the requested amount if the timidity process hasn't written enough audio yet.
src/gl/scene/gl_sprite.cpp:685:34: warning: '&&' within '||' [-Wlogical-op-parentheses]
src/polyrenderer/scene/poly_sprite.cpp:297:34: warning: '&&' within '||' [-Wlogical-op-parentheses]
src/swrenderer/scene/r_opaque_pass.cpp:975:35: warning: '&&' within '||' [-Wlogical-op-parentheses]
src/sound/mididevices/music_timiditypp_mididevice.cpp:548:30: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
Add code to find the timidity executable, and split the command line into separate arguments by spaces.
For some reason, this doesn't work, although reverting 64e96c5f makes timidity work again.
- 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.