aboutsummaryrefslogtreecommitdiff
path: root/src/adlmidi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/adlmidi.cpp')
-rw-r--r--src/adlmidi.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/adlmidi.cpp b/src/adlmidi.cpp
index b9e67cb..0bfac0f 100644
--- a/src/adlmidi.cpp
+++ b/src/adlmidi.cpp
@@ -44,19 +44,14 @@ ADLMIDI_EXPORT struct ADL_MIDIPlayer *adl_init(long sample_rate)
return NULL;
}
- MIDIplay *player = new MIDIplay;
+ MIDIplay *player = new MIDIplay(static_cast<unsigned long>(sample_rate));
if(!player)
{
free(midi_device);
ADLMIDI_ErrorString = "Can't initialize ADLMIDI: out of memory!";
return NULL;
}
-
midi_device->adl_midiPlayer = player;
- player->m_setup.PCM_RATE = static_cast<unsigned long>(sample_rate);
- player->m_setup.mindelay = 1.0 / (double)player->m_setup.PCM_RATE;
- player->m_setup.maxdelay = 512.0 / (double)player->m_setup.PCM_RATE;
- player->ChooseDevice("none");
adlRefreshNumCards(midi_device);
return midi_device;
}