Starts (or resumes) playback of a sample, stream, MOD music, or recording.
Assembly: Bass.Net (in Bass.Net.dll) Version: 184.108.40.206
[DllImportAttribute("bass")] public static bool BASS_ChannelPlay( int handle, bool restart )
<DllImportAttribute("bass">] Public Shared Function BASS_ChannelPlay ( handle As Integer, restart As Boolean ) As Boolean
- Type: SystemInt32
The channel handle... a HCHANNEL / HMUSIC / HSTREAM / HRECORD handle.
- Type: SystemBoolean
Restart playback from the beginning? If handle is a user stream, it's current buffer contents are flushed. If it's a MOD music, it's BPM/etc are automatically reset to their initial values.
Return ValueType: Boolean
If successful, is returned, else is returned. Use BASS_ErrorGetCode to get the error code.
|BASS_ERROR_HANDLE||handle is not a valid channel.|
|BASS_ERROR_START||The output is paused/stopped, use BASS_Start to start it.|
|BASS_ERROR_DECODE||The channel is not playable, it's a "decoding channel".|
|BASS_ERROR_BUFLOST||Should not happen... check that a valid window handle was used with.|
|BASS_ERROR_NOHW||No hardware voices are available (HCHANNEL only). This only occurs if the sample was loaded/created with the BASS_SAMPLE_VAM flag, and BASS_VAM_HARDWARE is set in the sample's VAM mode, and there are no hardware voices available to play it.|
Bass.BASS_Init(- 1, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero) ' create the stream Dim stream As Integer = Bass.BASS_StreamCreateFile("test.mp3", 0, 0, BASSFlag.BASS_DEFAULT) Bass.BASS_ChannelPlay(stream, False) ... Bass.BASS_StreamFree(stream)
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_ChannelPlay(stream, false); ... Bass.BASS_StreamFree(stream);