Author Topic: Pause and resume play midi with bassmix  (Read 1574 times)

Gamo

  • Posts: 97
Pause and resume play midi with bassmix
« on: 31 Mar '08 - 11:03 »
I have 2 midi stream and I create it like this :

    chan1 = BASS_MIDI_StreamCreateFile(BASSTRUE, VarPtr(DataStore(0)), 0, DataLen, BASS_MIDI_DECAYEND Or BASS_SAMPLE_SOFTWARE Or BASS_STREAM_DECODE Or BASS_MIDI_NOFX, 0)

    chan2 = BASS_MIDI_StreamCreateFile(BASSTRUE, VarPtr(DataStore(0)), 0, DataLen, BASS_MIDI_DECAYEND Or BASS_SAMPLE_SOFTWARE Or BASS_STREAM_DECODE Or BASS_MIDI_NOFX, 0)

and I add both to bassmix

    Call BASS_Mixer_StreamAddChannel(mixchan, chan1, BASS_MIXER_DOWNMIX)  ' plug source1 into mixer
    Call BASS_Mixer_StreamAddChannel(mixchan, chan2, BASS_MIXER_DOWNMIX)  ' plug source2 into mixer

How do I pause MIDI from chan1 and resume it?

Gamo

  • Posts: 97
Re: Pause and resume play midi with bassmix
« Reply #1 on: 31 Mar '08 - 11:25 »
OK I get i work by using following command

To Pause
            Call BASS_Mixer_ChannelFlags(chan1, BASS_MIXER_PAUSE, BASS_MIXER_PAUSE)

To Resume
            Call BASS_Mixer_ChannelFlags(chan1, 0, BASS_MIXER_PAUSE)