Example #1
0
 static extern int BASS_MIDI_StreamEvents(int handle, MidiEventsMode mode, [MarshalAs(UnmanagedType.LPArray)] byte[] Event, int length);
Example #2
0
 /// <summary>
 /// Applies any number of events to a MIDI stream.
 /// </summary>
 /// <param name="Handle">The MIDI stream to apply the events to.</param>
 /// <param name="Mode">Midi Events Mode.</param>
 /// <param name="Channel">To overcome the 16 channel limit, the event data's channel information can optionally be overridden by adding the new channel number to this parameter, where 1 = the 1st channel - else leave to 0.</param>
 /// <param name="Raw">The event data (raw data - byte[]).</param>
 /// <param name="Length">No of <see cref="byte"/>s... 0 = No of items in <paramref name="Raw"/> array.</param>
 /// <returns>If successful, the number of events processed is returned, else -1 is returned. Use <see cref="Bass.LastError" /> to get the error code.</returns>
 /// <remarks>
 /// <para>
 /// Events applied to a MIDI file stream can subsequently be overridden by events in the file itself, and will also be overridden when seeking or looping.
 /// That can be avoided by using additional channels, allocated via the <see cref="ChannelAttribute.MidiChannels" /> attribute.
 /// </para>
 /// <para>
 /// If the MIDI stream is being played (it's not a decoding channel), then there will be some delay in the effect of the event being heard.
 /// This latency can be reduced by making use of the <see cref="Bass.PlaybackBufferLength"/> and <see cref="Bass.UpdatePeriod"/> config options when creating the stream.
 /// </para>
 /// </remarks>
 /// <exception cref="Errors.Handle"><paramref name="Handle"/> is not valid.</exception>
 /// <exception cref="Errors.Parameter"><paramref name="Mode"/> is not valid.</exception>
 public static int StreamEvents(int Handle, MidiEventsMode Mode, int Channel, byte[] Raw, int Length = 0)
 {
     return(BASS_MIDI_StreamEvents(Handle, MidiEventsMode.Raw + Channel | Mode, Raw, Length == 0 ? Raw.Length : Length));
 }
Example #3
0
 static extern int BASS_MIDI_StreamEvents(int Handle, MidiEventsMode Mode, byte[] Events, int Length);
Example #4
0
 /// <summary>
 /// Applies any number of events to a MIDI stream.
 /// </summary>
 /// <param name="Handle">The MIDI stream to apply the events to.</param>
 /// <param name="Mode">Midi Events Mode.</param>
 /// <param name="Events">The event data (an array of <see cref="MidiEvent" /> structures).</param>
 /// <param name="Length">No of <see cref="MidiEvent"/> items... 0 = No of items in <paramref name="Events"/> array.</param>
 /// <returns>If successful, the number of events processed is returned, else -1 is returned. Use <see cref="Bass.LastError" /> to get the error code.</returns>
 /// <remarks>
 /// <para>
 /// Events applied to a MIDI file stream can subsequently be overridden by events in the file itself, and will also be overridden when seeking or looping.
 /// That can be avoided by using additional channels, allocated via the <see cref="ChannelAttribute.MidiChannels" /> attribute.
 /// </para>
 /// <para>
 /// If the MIDI stream is being played (it's not a decoding channel), then there will be some delay in the effect of the event being heard.
 /// This latency can be reduced by making use of the <see cref="Bass.PlaybackBufferLength"/> and <see cref="Bass.UpdatePeriod"/> config options when creating the stream.
 /// </para>
 /// </remarks>
 /// <exception cref="Errors.Handle"><paramref name="Handle"/> is not valid.</exception>
 /// <exception cref="Errors.Parameter"><paramref name="Mode"/> is not valid.</exception>
 public static int StreamEvents(int Handle, MidiEventsMode Mode, MidiEvent[] Events, int Length = 0)
 {
     return(BASS_MIDI_StreamEvents(Handle, Mode & ~MidiEventsMode.Raw, Events, Length == 0 ? Events.Length : Length));
 }
Example #5
0
 public static extern int StreamEvents(int Handle, MidiEventsMode Mode, IntPtr Events, int Length);