BASS.NET API for the Un4seen BASS Audio LibraryBassBASS_ChannelGetMusicSample Method BASS.NET API for the Un4seen BASS Audio Library
Retrieves a specific MOD sample name from a channel, if it is available.

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

public static string BASS_ChannelGetMusicSample(
	int handle,
	int sample
)

Parameters

handle
Type: SystemInt32
The channel handle...a HMUSIC.
sample
Type: SystemInt32
The sample number (0=first).

Return Value

Type: String
or a single string representing the MOD sample name.
Remarks

Only available for MOD music channels.

ERROR CODEDescription
BASS_ERROR_HANDLEhandle is not valid.
BASS_ERROR_NOTAVAILThe requested tags are not available.

Examples

List all MOD music's samples:
VB
Dim name As String = [String].Empty
Dim i As Integer = 0
While True
  name = Bass.BASS_ChannelGetMusicSample([mod], i)
  If Not (name Is Nothing) Then
    Console.Writeln([String].Format("Sample {0}={1}", i, name))
  Else
    Exit While
  End If
  i += 1
End While
string name = String.Empty;
int i = 0;
while ( true )
{
  name = Bass.BASS_ChannelGetMusicSample( mod, i );
  if ( name != null )
    Console.Writeln( String.Format( "Sample {0}={1}", i, name ) );
  else
    break;
  i++;
}
See Also

Reference