diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2008-12-08 19:07:42 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2008-12-08 19:07:42 +0000 |
| commit | c56f4a00a5a86a2f923103fdcb921c208e1e1a84 (patch) | |
| tree | 755f7df479c44fa4c3b41d2d2be5bd09f8c37767 /src/plugins/Input/wildmidi/decoder_wildmidi.cpp | |
| parent | 47269eb9a00b983d791cee8e1309ff1f735b6d7b (diff) | |
| download | qmmp-c56f4a00a5a86a2f923103fdcb921c208e1e1a84.tar.gz qmmp-c56f4a00a5a86a2f923103fdcb921c208e1e1a84.tar.bz2 qmmp-c56f4a00a5a86a2f923103fdcb921c208e1e1a84.zip | |
fixed some midi bugs
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@673 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Input/wildmidi/decoder_wildmidi.cpp')
| -rw-r--r-- | src/plugins/Input/wildmidi/decoder_wildmidi.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/plugins/Input/wildmidi/decoder_wildmidi.cpp b/src/plugins/Input/wildmidi/decoder_wildmidi.cpp index 48b2c636e..d24ec2cd4 100644 --- a/src/plugins/Input/wildmidi/decoder_wildmidi.cpp +++ b/src/plugins/Input/wildmidi/decoder_wildmidi.cpp @@ -88,10 +88,7 @@ void DecoderWildMidi::flush(bool final) } if (m_user_stop || m_finish) - { - m_inited = FALSE; m_done = TRUE; - } else { m_output_bytes -= produceSound(m_output_buf, m_output_bytes, m_bitrate, m_chan); @@ -117,14 +114,14 @@ bool DecoderWildMidi::initialize() m_output_size = 0; m_seekTime = -1.0; m_totalTime = 0.0; - _WM_Info *wm_info = 0; //TODO fix memory leak + _WM_Info *wm_info = 0; if (! m_output_buf) m_output_buf = new char[globalBufferSize]; m_output_at = 0; m_output_bytes = 0; - wm_info = new _WM_Info; + //wm_info = new _WM_Info; unsigned long int mixer_options = 0; @@ -160,11 +157,12 @@ void DecoderWildMidi::seek(qint64 pos) void DecoderWildMidi::deinit() { + if (m_inited) + WildMidi_Shutdown(); m_inited = m_user_stop = m_done = m_finish = FALSE; m_freq = m_bitrate = 0; m_chan = 0; m_output_size = 0; - WildMidi_Shutdown(); } void DecoderWildMidi::run() @@ -190,7 +188,6 @@ void DecoderWildMidi::run() if (m_seekTime >= 0.0) { - // WavpackSeekSample (m_context, m_seekTime * m_freq); qint64 i = m_seekTime *44100; long unsigned int *sample_pos = (long unsigned int *) &i; WildMidi_FastSeek(midi_ptr, sample_pos); |
