mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 15:22:15 +00:00
- moved the last static variable - def_inst_name into the Instruments class.
With this the GUS device should be fully reentrant.
This commit is contained in:
parent
1cb668e895
commit
9aecabc887
2 changed files with 3 additions and 4 deletions
|
@ -38,8 +38,6 @@
|
||||||
namespace Timidity
|
namespace Timidity
|
||||||
{
|
{
|
||||||
|
|
||||||
static std::string def_instr_name;
|
|
||||||
|
|
||||||
static long ParseCommandLine(const char* args, int* argc, char** argv)
|
static long ParseCommandLine(const char* args, int* argc, char** argv)
|
||||||
{
|
{
|
||||||
int count;
|
int count;
|
||||||
|
@ -718,8 +716,8 @@ Renderer::Renderer(float sample_rate, int voices_, Instruments *inst)
|
||||||
|
|
||||||
default_instrument = NULL;
|
default_instrument = NULL;
|
||||||
default_program = DEFAULT_PROGRAM;
|
default_program = DEFAULT_PROGRAM;
|
||||||
if (def_instr_name.length() > 0)
|
if (inst->def_instr_name.length() > 0)
|
||||||
set_default_instrument(def_instr_name.c_str());
|
set_default_instrument(inst->def_instr_name.c_str());
|
||||||
|
|
||||||
voices = std::max(voices_, 16);
|
voices = std::max(voices_, 16);
|
||||||
voice = new Voice[voices];
|
voice = new Voice[voices];
|
||||||
|
|
|
@ -168,6 +168,7 @@ public:
|
||||||
ToneBank* tonebank[MAXBANK] = {};
|
ToneBank* tonebank[MAXBANK] = {};
|
||||||
ToneBank* drumset[MAXBANK] = {};
|
ToneBank* drumset[MAXBANK] = {};
|
||||||
FontFile* Fonts = nullptr;
|
FontFile* Fonts = nullptr;
|
||||||
|
std::string def_instr_name;
|
||||||
|
|
||||||
Instruments(SoundFontReaderInterface* reader);
|
Instruments(SoundFontReaderInterface* reader);
|
||||||
~Instruments();
|
~Instruments();
|
||||||
|
|
Loading…
Reference in a new issue