Starts (or resumes) playback of a sample, stream, MOD music, or recording.
BOOL BASS_ChannelPlay( DWORD handle, BOOL restart );
handle | The channel handle... a HCHANNEL, HMUSIC, HSTREAM, or HRECORD. |
restart | Restart playback from the beginning? If handle is a user stream (created with BASS_StreamCreate), its current buffer contents are cleared. If it is a MOD music, its BPM/etc are reset to their initial values. |
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 is a "decoding channel". |
BASS_ERROR_BUFLOST | Should not happen... check that a valid window handle was used with BASS_Init. |
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. |
If other channels have been linked to the specified channel via BASS_ChannelSetLink, 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 can be used to confirm the status of linked channels.