Returns a given marker position.
Namespace: Un4seen.Bass.Misc
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax
Parameters
- name
- Type: SystemString
The name of the marker to get.
Return Value
Type: Int64The marker position in bytes or -1 if the marker name does not exist.
Remarks
If your rendering method and your playback stream used different flags during creation (e.g. rendering was done using the BASS_DEFAULT flag whereas your playback stream uses BASS_SAMPLE_FLOAT) this method would return the position according to the rendering process, meaning the position would reflect a different value. In this case make sure to call SyncPlayback(Int32) before getting any markers. This will ensure that the position will be converted accordingly to the playback.
Examples
private Un4seen.Bass.Misc.WaveForm WF = null; ... // render a wave form WF = new WaveForm(_fileName, new WAVEFORMPROC(MyWaveFormCallback), this); WF.FrameResolution = 0.01f; // 10ms are nice WF.CallbackFrequency = 500; // every 5 seconds rendered (500*10ms=5sec) WF.DrawMarker = WaveForm.MARKERDRAWTYPE.Line | WaveForm.MARKERDRAWTYPE.Name | WaveForm.MARKERDRAWTYPE.NamePositionAlternate; WF.RenderStart( false, BASSFlag.BASS_SAMPLE_FLOAT ); // from here on we might add markers...just examples here... WF.AddMarker( "CueIn", Bass.BASS_ChannelSeconds2Bytes(_stream, 2.0) ); ... // this will get the 'CueIn' marker long position = WF.GetMarker( "CueIn" );
See Also