C# Class xZune.Bass.AudioStream

A audio sample stream.
Inheritance: Channel, IStream
Exibir arquivo Open project: higankanshi/xZune.Bass

Public Methods

Method Description
AudioStream ( StreamHandler handler, int freq, int channels, StreamCreateConfig configs, IntPtr user ) : System

Creates a user sample stream.

Sample streams allow any sample data to be played through Bass, and are particularly useful for playing a large amount of sample data without requiring a large amount of memory. If you wish to play a sample format that BASS does not support, then you can create a stream and decode the sample data into it. BASS can automatically stream MP3, MP2, MP1, OGG, WAV and AIFF files, using CreateFile, and also from HTTP and FTP servers, using CreateURL. CreateFileUser allows streaming from other sources too.

GetFilePosition ( FilePositionMode mode ) : System.UInt64

Get the file position/status of a stream.

PutData ( byte buffer ) : int

Adds sample data to a "push" stream.

Protected Methods

Method Description
AudioStream ( ) : System
Free ( ) : void

Frees a sample stream's resources, including any sync/DSP/FX it has.

ReleaseManaged ( ) : void
ReleaseUnmanaged ( ) : void

Method Details

AudioStream() protected method

protected AudioStream ( ) : System
return System

AudioStream() public method

Creates a user sample stream.
Sample streams allow any sample data to be played through Bass, and are particularly useful for playing a large amount of sample data without requiring a large amount of memory. If you wish to play a sample format that BASS does not support, then you can create a stream and decode the sample data into it. BASS can automatically stream MP3, MP2, MP1, OGG, WAV and AIFF files, using CreateFile, and also from HTTP and FTP servers, using CreateURL. CreateFileUser allows streaming from other sources too.
public AudioStream ( StreamHandler handler, int freq, int channels, StreamCreateConfig configs, IntPtr user ) : System
handler StreamHandler /// The user defined stream writing function, or one of the /// and . ///
freq int The default sample rate. The sample rate can be changed using .
channels int The number of channels... 1 = mono, 2 = stereo, 4 = quadraphonic, 6 = 5.1, 8 = 7.1.
configs StreamCreateConfig Configure of create a steam.
user System.IntPtr User instance data to pass to the callback function. Unused when creating a dummy or push stream.
return System

Free() protected method

Frees a sample stream's resources, including any sync/DSP/FX it has.
/// Some error occur to call a Bass function, check the error code and error message /// to get more error information. /// /// Bass DLL not loaded, you must use to /// load Bass DLL first. /// Channel object is no longer available.
protected Free ( ) : void
return void

GetFilePosition() public method

Get the file position/status of a stream.
/// Bass DLL not loaded, you must use to /// load Bass DLL first. /// /// Some error occur to call a Bass function, check the error code and error message /// to get more error information. /// Channel object is no longer available.
public GetFilePosition ( FilePositionMode mode ) : System.UInt64
mode FilePositionMode The file position/status to retrieve.
return System.UInt64

PutData() public method

Adds sample data to a "push" stream.
/// Some error occur to call a Bass function, check the error code and error message /// to get more error information. /// /// Bass DLL not loaded, you must use to /// load Bass DLL first. /// Channel object is no longer available.
public PutData ( byte buffer ) : int
buffer byte /// Pointer to the sample data... NULL = allocate space in the queue buffer so that there is at least /// length bytes of free space. Empty array can be used to just check how much data is queued. ///
return int

ReleaseManaged() protected method

protected ReleaseManaged ( ) : void
return void

ReleaseUnmanaged() protected method

protected ReleaseUnmanaged ( ) : void
return void