BASS.NET API for the Un4seen BASS Audio LibraryBASSSync EnumerationBASS.NET API for the Un4seen BASS Audio Library
Sync types to be used with BASS_ChannelSetSync(Int32, BASSSync, Int64, SYNCPROC, IntPtr) (param flag) and SYNCPROC (data flag).

Namespace: Un4seen.Bass
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.12.0
Syntax

public enum BASSSync
Members

  Member nameValueDescription
BASS_SYNC_POS0 Sync when a channel reaches a position.

param : position in bytes

data : not used

BASS_SYNC_MUSICINST1 Sync when an instrument (sample for the non-instrument based formats) is played in a MOD music (not including retrigs).

param : LOWORD=instrument (1=first) HIWORD=note (0=c0...119=b9, -1=all)

data : LOWORD=note HIWORD=volume (0-64)

BASS_SYNC_END2 Sync when a channel reaches the end.

param : not used

data : 1 = the sync is triggered by a backward jump in a MOD music, otherwise not used

BASS_SYNC_MUSICFX3 Sync when the "sync" effect (XM/MTM/MOD: E8x/Wxx, IT/S3M: S2x) is used.

param : 0:data=pos, 1:data="x" value

data : param=0: LOWORD=order HIWORD=row, param=1: "x" value

BASS_SYNC_META4 Sync when metadata is received in a stream.

param : not used

data : not used - the updated metadata is available from BASS_ChannelGetTags(Int32, BASSTag) (BASS_TAG_META)

BASS_SYNC_SLIDE5 Sync when an attribute slide is completed.

param : not used

data : the type of slide completed (one of the BASS_SLIDE_xxx values)

BASS_SYNC_STALL6 Sync when playback has stalled.

param : not used

data : 0=stalled, 1=resumed

BASS_SYNC_DOWNLOAD7 Sync when downloading of an internet (or "buffered" user file) stream has ended.

param : not used

data : not used

BASS_SYNC_FREE8 Sync when a channel is freed.

param : not used

data : not used

BASS_SYNC_MUSICPOS10 Sync when a MOD music reaches an order:row position.

param : LOWORD=order (0=first, -1=all) HIWORD=row (0=first, -1=all)

data : LOWORD=order HIWORD=row

BASS_SYNC_SETPOS11 Sync when seeking (inc. looping and restarting). So it could be used to reset DSP/etc.

param : position in bytes

data : 0=playback is unbroken, 1=if is it broken (eg. buffer flushed). The latter would be the time to reset DSP/etc.

BASS_SYNC_OGG_CHANGE12 Sync when a new logical bitstream begins in a chained OGG stream. Updated tags are available from BASS_ChannelGetTags(Int32, BASSTag).

param : not used

data : not used

BASS_SYNC_STOP14 Sync when the DirectSound buffer fails during playback, eg. when the device is no longer available.

param : not used

data : not used

BASS_SYNC_MIXTIME1073741824 FLAG: sync at mixtime, else at playtime
BASS_SYNC_ONETIME-2147483648 FLAG: sync only once, else continuously
BASS_SYNC_MIXER_ENVELOPE66048 MIX add-on: Sync when an envelope reaches the end.

param : not used

data : envelope type

BASS_SYNC_MIXER_ENVELOPE_NODE66049 MIX add-on: Sync when an envelope node is reached.

param : Optional limit the sync to a certain envelope type (one of the BASSMIXEnvelope values).

data : Will contain the envelope type in the LOWORD and the current node number in the HIWORD.

BASS_SYNC_WMA_CHANGE65792 WMA add-on: Sync on a track change in a server-side playlist. Updated tags are available via BASS_ChannelGetTags(Int32, BASSTag).

param : not used

data : not used

BASS_SYNC_WMA_META65793 WMA add-on: Sync on a mid-stream tag change in a server-side playlist. Updated tags are available via BASS_ChannelGetTags(Int32, BASSTag).

param : not used

data : not used - the updated metadata is available from BASS_ChannelGetTags(Int32, BASSTag) (BASS_TAG_WMA_META)

BASS_SYNC_CD_ERROR1000 CD add-on: Sync when playback is stopped due to an error. For example, the drive door being opened.

param : not used

data : the position that was being read from the CD track at the time.

BASS_SYNC_CD_SPEED1002 CD add-on: Sync when the read speed is automatically changed due to the BASS_CONFIG_CD_AUTOSPEED setting.

param : not used

data : the new read speed.

BASS_WINAMP_SYNC_BITRATE100 WINAMP add-on: Sync when bitrate is changed or retrieved from a winamp input plug-in.

param : not used

data : the bitrate retrieved from the winamp input plug-in - called when it is retrieved or changed (VBR MP3s, OGGs, etc).

BASS_SYNC_MIDI_MARKER65536 MIDI add-on: Sync when a marker is encountered.

param : not used

data : the marker index, which can be used in a BASS_MIDI_StreamGetMark(Int32, BASSMIDIMarker, Int32, BASS_MIDI_MARK) call.

Examples

VB
Private Sub MidiSync(handle As Integer, channel As Integer, data As Integer, user As IntPtr)
  Dim mark As BASS_MIDI_MARK = BassMidi.BASS_MIDI_StreamGetMark(channel, BASSMIDIMarker.BASS_MIDI_MARK_MARKER, data)
  ...
End Sub
private void MidiSync(int handle, int channel, int data, IntPtr user)
{
  BASS_MIDI_MARK mark = BassMidi.BASS_MIDI_StreamGetMark(channel, BASSMIDIMarker.BASS_MIDI_MARK_MARKER, data);
  ...
}

BASS_SYNC_MIDI_CUE65537 MIDI add-on: Sync when a cue is encountered.

param : not used

data : the marker index, which can be used in a BASS_MIDI_StreamGetMark(Int32, BASSMIDIMarker, Int32, BASS_MIDI_MARK) call.

Examples

VB
Private Sub MidiSync(handle As Integer, channel As Integer, data As Integer, user As IntPtr)
  Dim mark As BASS_MIDI_MARK = BassMidi.BASS_MIDI_StreamGetMark(channel, BASSMIDIMarker.BASS_MIDI_MARK_CUE, data)
  ...
End Sub
private void MidiSync(int handle, int channel, int data, IntPtr user)
{
  BASS_MIDI_MARK mark = BassMidi.BASS_MIDI_StreamGetMark(channel, BASSMIDIMarker.BASS_MIDI_MARK_CUE, data);
  ...
}

BASS_SYNC_MIDI_LYRIC65538 MIDI add-on: Sync when a lyric event is encountered.

param : not used

data : the marker index, which can be used in a BASS_MIDI_StreamGetMark(Int32, BASSMIDIMarker, Int32, BASS_MIDI_MARK) call. If the text begins with a '/' (slash) character, a new line should be started. If it begins with a '\' (backslash) character, the display should be cleared.

Examples

VB
Private Sub MidiSync(handle As Integer, channel As Integer, data As Integer, user As IntPtr)
  Dim mark As BASS_MIDI_MARK = BassMidi.BASS_MIDI_StreamGetMark(channel, BASSMIDIMarker.BASS_MIDI_MARK_LYRIC, data)
  ...
End Sub
private void MidiSync(int handle, int channel, int data, IntPtr user)
{
  BASS_MIDI_MARK mark = BassMidi.BASS_MIDI_StreamGetMark(channel, BASSMIDIMarker.BASS_MIDI_MARK_LYRIC, data);
  ...
}

BASS_SYNC_MIDI_TEXT65539 MIDI add-on: Sync when a text event is encountered.

param : not used

data : the marker index, which can be used in a BASS_MIDI_StreamGetMark(Int32, BASSMIDIMarker, Int32, BASS_MIDI_MARK) call. Lyrics can sometimes be found in BASS_MIDI_MARK_TEXT instead of BASS_MIDI_MARK_LYRIC markers.

Examples

VB
Private Sub MidiSync(handle As Integer, channel As Integer, data As Integer, user As IntPtr)
  Dim mark As BASS_MIDI_MARK = BassMidi.BASS_MIDI_StreamGetMark(channel, BASSMIDIMarker.BASS_SYNC_MIDI_TEXT, data)
  ...
End Sub
private void MidiSync(int handle, int channel, int data, IntPtr user)
{
  BASS_MIDI_MARK mark = BassMidi.BASS_MIDI_StreamGetMark(channel, BASSMIDIMarker.BASS_SYNC_MIDI_TEXT, data);
  ...
}

BASS_SYNC_MIDI_EVENT65540 MIDI add-on: Sync when a type of event is processed, in either a MIDI file or BASS_MIDI_StreamEvent(Int32, Int32, BASSMIDIEvent, Int32).

param : event type (0 = all types).

data : LOWORD = event parameter, HIWORD = channel (high 8 bits contain the event type when syncing on all types). See BASS_MIDI_StreamEvent(Int32, Int32, BASSMIDIEvent, Int32) for a list of event types and their parameters.

BASS_SYNC_MIDI_TICK65541 MIDI add-on: Sync when reaching a tick position.

param : tick position.

data : not used

BASS_SYNC_MIDI_TIMESIG65542 MIDI add-on: Sync when a time signature event is processed.

param : event type.

data : The time signature events are given (by BASS_MIDI_StreamGetMark(Int32, BASSMIDIMarker, Int32, BASS_MIDI_MARK)) in the form of "numerator/denominator metronome-pulse 32nd-notes-per-MIDI-quarter-note", eg. "4/4 24 8".

BASS_SYNC_MIDI_KEYSIG65543 MIDI add-on: Sync when a key signature event is processed.

param : event type.

data : The key signature events are given (by BASS_MIDI_StreamGetMark(Int32, BASSMIDIMarker, Int32, BASS_MIDI_MARK)) in the form of "a b", where a is the number of sharps (if positive) or flats (if negative), and b signifies major (if 0) or minor (if 1).

BASS_SYNC_HLS_SEGMENT66304 BASShls add-on: Sync when a new segment begins downloading.

param : not used.

data : not used.

See Also

Reference