BASS.NET API for the Un4seen BASS Audio Library

BassBASS_ChannelStart Method

BASS.NET API for the Un4seen BASS Audio Library
Starts/resumes playback of a sample, stream, MOD music, or a recording.

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

[DllImportAttribute("bass")]
public static bool BASS_ChannelStart(
	int handle
)

Parameters

handle
Type: SystemInt32
The channel handle... a HCHANNEL, HMUSIC, HSTREAM, or HRECORD.

Return Value

Type: Boolean
If successful, is returned, else is returned. Use BASS_ErrorGetCode to get the error code.
Remarks

If other channels have been linked to the specified channel via BASS_ChannelSetLink(Int32, Int32), this function will attempt to simultaneously start playing them too but if any fail, it will be silently. The return value and error code only reflects what happened with the specified channel. BASS_ChannelIsActive(Int32) can be used to confirm the status of linked channels.

ERROR CODEDescription
BASS_ERROR_HANDLEhandle is not a valid channel.
BASS_ERROR_STARTThe output is paused/stopped, use BASS_Start to start it.
BASS_ERROR_DECODEThe channel is not playable, it's a "decoding channel".

Examples

Bass.BASS_Init(-1, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero);
// create the stream
int stream = Bass.BASS_StreamCreateFile("test.mp3", 0, 0, BASSFlag.BASS_DEFAULT);
Bass.BASS_ChannelStart(stream, false);
...
Bass.BASS_StreamFree(stream);
See Also

Reference