C# Класс xZune.Bass.AudioSample

A audio sample.
Наследование: HandleObject, ISample
Показать файл Открыть проект

Открытые методы

Метод Описание
AudioSample ( MemoryStream stream, uint max, SampleLoadConfig config ) : System

Create a sample form a WAV, AIFF, MP3, MP2, MP1, OGG or plug-in supported file sample stream.

AudioSample ( String file, System.UInt64 offset, uint length, uint max, SampleLoadConfig config ) : System

Create a sample form a WAV, AIFF, MP3, MP2, MP1, OGG or plug-in supported file sample.

AudioSample ( uint length, uint freq, uint channels, uint max, SampleConfig config ) : System

Creates a new sample.

GetChannel ( bool recycle ) : SampleChannel

Creates/initializes a playback channel for a sample.

GetChannels ( ) : xZune.Bass.SampleChannel[]

Get all a sample's existing channels.

Stop ( ) : void

Stops all channels instances of a sample.

Защищенные методы

Метод Описание
AudioSample ( ) : System
Free ( ) : void
ReleaseManaged ( ) : void
ReleaseUnmanaged ( ) : void

Описание методов

AudioSample() защищенный Метод

protected AudioSample ( ) : System
Результат System

AudioSample() публичный Метод

Create a sample form a WAV, AIFF, MP3, MP2, MP1, OGG or plug-in supported file sample stream.
public AudioSample ( MemoryStream stream, uint max, SampleLoadConfig config ) : System
stream System.IO.MemoryStream A .NET memory stream.
max uint /// Maximum number of simultaneous playbacks... 1 (min) - 65535 (max)... use one of the /// SampleConfig.OverXX flags to choose the override decider, in the case of there being no free channel available for /// playback (ie. the sample is already playing max times). ///
config SampleLoadConfig Some configures of sample.
Результат System

AudioSample() публичный Метод

Create a sample form a WAV, AIFF, MP3, MP2, MP1, OGG or plug-in supported file sample.
public AudioSample ( String file, System.UInt64 offset, uint length, uint max, SampleLoadConfig config ) : System
file String File name.
offset System.UInt64 File offset to load the sample from.
length uint /// Data length... 0 = use all data up to the end of file. If length over-runs the end of the file, it /// will automatically be lowered to the end of the file. ///
max uint /// Maximum number of simultaneous playbacks... 1 (min) - 65535 (max)... use one of the /// SampleConfig.OverXX flags to choose the override decider, in the case of there being no free channel available for /// playback (ie. the sample is already playing max times). ///
config SampleLoadConfig Some configures of sample.
Результат System

AudioSample() публичный Метод

Creates a new sample.
/// 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. ///
public AudioSample ( uint length, uint freq, uint channels, uint max, SampleConfig config ) : System
length uint The sample's length, in bytes.
freq uint The default sample rate.
channels uint The number of channels... 1 = mono, 2 = stereo, etc.
max uint /// Maximum number of simultaneous playbacks... 1 (min) - 65535 (max)... use one of the /// SampleConfig.OverXX flags to choose the override decider, in the case of there being no free channel available for /// playback (ie. the sample is already playing max times). ///
config SampleConfig Some configures of sample.
Результат System

Free() защищенный Метод

Channel object is no longer available. /// 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. ///
protected Free ( ) : void
Результат void

GetChannel() публичный Метод

Creates/initializes a playback channel for a sample.
Channel object is no longer available. /// 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. ///
public GetChannel ( bool recycle ) : SampleChannel
recycle bool Recycle on of the existing channels, then to create a new.
Результат SampleChannel

GetChannels() публичный Метод

Get all a sample's existing channels.
Channel object is no longer available. /// 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. ///
public GetChannels ( ) : xZune.Bass.SampleChannel[]
Результат xZune.Bass.SampleChannel[]

ReleaseManaged() защищенный Метод

protected ReleaseManaged ( ) : void
Результат void

ReleaseUnmanaged() защищенный Метод

protected ReleaseUnmanaged ( ) : void
Результат void

Stop() публичный Метод

Stops all channels instances of a sample.
Channel object is no longer available. /// 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. ///
public Stop ( ) : void
Результат void