static void Flush (decoder_t *p_dec) { decoder_sys_t *p_sys = p_dec->p_sys; date_Set (&p_sys->end_date, VLC_TS_INVALID); //fluid_synth_system_reset (p_sys->synth); fluid_synth_program_reset (p_sys->synth); for (unsigned channel = 0; channel < 16; channel++) for (unsigned note = 0; note < 128; note++) fluid_synth_noteoff (p_sys->synth, channel, note); }
virtual bool Rewind() { for(std::vector<MidiTrack>::iterator i = Tracks.begin(), end = Tracks.end();i != end;i++) { i->Reset(); unsigned long val = i->ReadVarLen(); i->SamplesLeft += val * samplesPerTick; } fluid_synth_program_reset(fluidSynth); UpdateTempo(500000); return true; }