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

Наследование: HandleObject, IChannel, IChannelInternal
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Get3DAttribute ( Channel3DMode &mode, float &min, float &max, uint &iAngle, uint &oAngle, float &outVloume ) : void

Get the 3D attributes of a sample, stream, or MOD music channel with 3D functionality.

Get3DPosition ( Vector3 &pos, Vector3 &orientation, Vector3 &vel ) : void

Get the 3D position of a sample, stream, or MOD music channel with 3D functionality.

GetDate ( IntPtr buffer, SampleDataType dataType ) : uint
GetLevelEx ( LevelConfig config, float length ) : float[]

Retrieves the level of a sample, stream, MOD music, or recording channel.

Lock ( ) : void

Locks a stream, MOD music or recording channel to the current thread.

Locking a channel prevents other threads from performing most functions on it, including buffer updates. Other threads wanting to access a locked channel will block until it is unlocked, so a channel should only be locked very briefly. A channel must be unlocked in the same thread that it was locked.

Pause ( ) : void

Pauses a sample, stream, MOD music, or recording.

PauseTest ( ) : System.Threading.Tasks.Task
Play ( ) : void

Starts (or resumes) playback of a sample, stream, MOD music, or recording.

PlayTest ( ) : System.Threading.Tasks.Task
RemoveEffect ( Effect effect ) : void

Removes an effect on a stream, MOD music, or recording channel.

Replay ( ) : void

Restart playback of a sample, stream, MOD music, or recording.

ResetEffects ( ) : void

Resets the state of all effects on a channel.

This function flushes the internal buffers of the effects. Effects are automatically reset by Position, except when called from a "mixtime" SYNCPROC.

Set3DAttribute ( Channel3DMode mode, float min, float max, uint iAngle, uint oAngle, float outVloume ) : void

Sets the 3D attributes of a sample, stream, or MOD music channel with 3D functionality.

Set3DPosition ( Vector3 pos, Vector3 orientation, Vector3 vel ) : void

Sets the 3D position of a sample, stream, or MOD music channel with 3D functionality.

SetFreqAnimate ( float value, uint time ) : void

Slides a channel's Freq from its current value to a new value.

SetPanningPositionAnimate ( float value, uint time ) : void

Slides a channel's PanningPosition from its current value to a new value.

SetVolumeAnimate ( float value, uint time ) : void

Slides a channel's Volume from its current value to a new value.

Stop ( ) : void

Stops a sample, stream, MOD music, or recording, Stop can be used to stop a paused channel.

Unlock ( ) : void

Unlocks a stream, MOD music or recording channel to the current thread.

Locking a channel prevents other threads from performing most functions on it, including buffer updates. Other threads wanting to access a locked channel will block until it is unlocked, so a channel should only be locked very briefly. A channel must be unlocked in the same thread that it was locked.

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

Метод Описание
AttachEvent ( ) : void
Channel ( ) : System
Free ( ) : void

Приватные методы

Метод Описание
IChannelInternal ( DisplayHandler handler, IntPtr user, int priority ) : IntPtr
IChannelInternal ( SyncHandlerType type, System.UInt64 param, SyncHandler handler, IntPtr user ) : IntPtr
IChannelInternal ( PositionConfig config ) : System.UInt64
IChannelInternal ( ChannelAttribute attribute ) : bool
IChannelInternal ( ChannelAttributeEx attribute ) : byte[]
IChannelInternal ( ulong position ) : double
IChannelInternal ( ChannelAttribute attribute ) : float
IChannelInternal ( TagType type ) : object
IChannelInternal ( PositionConfig config ) : ulong
IChannelInternal ( double time ) : ulong
IChannelInternal ( Channel channel ) : void
IChannelInternal ( ChannelAttribute attribute, float value ) : void
IChannelInternal ( ChannelAttribute attribute, float value, uint time ) : void
IChannelInternal ( ChannelAttributeEx attribute, byte value ) : void
IChannelInternal ( xZune.Bass.Interop.Flags.ChannelFlags config, xZune.Bass.Interop.Flags.ChannelFlags mask ) : void
IChannelInternal ( IntPtr displayHandle ) : void
IChannelInternal ( PositionConfig config, ulong value ) : void
IChannelInternal ( int length ) : void
OnAnimationCompleted ( IntPtr displayHandle, IntPtr channel, uint data, IntPtr user ) : void
OnEnded ( IntPtr displayHandle, IntPtr channel, uint data, IntPtr user ) : void
OnFreed ( IntPtr displayHandle, IntPtr channel, uint data, IntPtr user ) : void
OnMetaTagAvailabled ( IntPtr displayHandle, IntPtr channel, uint data, IntPtr user ) : void
OnOggChanged ( IntPtr displayHandle, IntPtr channel, uint data, IntPtr user ) : void
OnPlaybacking ( IntPtr displayHandle, IntPtr channel, IntPtr buffer, uint length, IntPtr user ) : void
OnPositionSet ( IntPtr displayHandle, IntPtr channel, uint data, IntPtr user ) : void
OnStallOrResumed ( IntPtr displayHandle, IntPtr channel, uint data, IntPtr user ) : void

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

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

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

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

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

Free() защищенный абстрактный Метод

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

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

Get the 3D attributes of a sample, stream, or MOD music channel with 3D functionality.
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 Get3DAttribute ( Channel3DMode &mode, float &min, float &max, uint &iAngle, uint &oAngle, float &outVloume ) : void
mode Channel3DMode The 3D processing mode.
min float The minimum distance.
max float The maximum distance.
iAngle uint The angle of the inside projection cone.
oAngle uint The angle of the outside projection cone.
outVloume float The delta-volume outside the outer projection cone.
Результат void

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

Get the 3D position of a sample, stream, or MOD music channel with 3D functionality.
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 Get3DPosition ( Vector3 &pos, Vector3 &orientation, Vector3 &vel ) : void
pos Vector3 Position of the sound.
orientation Vector3 Orientation of the sound.
vel Vector3 Velocity of the sound.
Результат void

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

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 GetDate ( IntPtr buffer, SampleDataType dataType ) : uint
buffer System.IntPtr
dataType SampleDataType
Результат uint

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

Retrieves the level of a sample, stream, MOD music, or recording channel.
public GetLevelEx ( LevelConfig config, float length ) : float[]
config LevelConfig Level configure.
length float /// The amount of data to inspect to calculate the level, in seconds. The maximum is 1 second. Less /// data than requested may be used if the full amount is not available, eg. if the channel's playback buffer is /// shorter. ///
Результат float[]

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

Locks a stream, MOD music or recording channel to the current thread.
Locking a channel prevents other threads from performing most functions on it, including buffer updates. Other threads wanting to access a locked channel will block until it is unlocked, so a channel should only be locked very briefly. A channel must be unlocked in the same thread that it was locked.
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 Lock ( ) : void
Результат void

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

Pauses a sample, stream, MOD music, or recording.
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 Pause ( ) : void
Результат void

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

public PauseTest ( ) : System.Threading.Tasks.Task
Результат System.Threading.Tasks.Task

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

Starts (or resumes) playback of a sample, stream, MOD music, or recording.
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 Play ( ) : void
Результат void

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

public PlayTest ( ) : System.Threading.Tasks.Task
Результат System.Threading.Tasks.Task

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

Removes an effect on a stream, MOD music, or recording channel.
Effect is not on channel.
public RemoveEffect ( Effect effect ) : void
effect Effect The effect to remove from the channel.
Результат void

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

Restart playback of a sample, stream, MOD music, or recording.
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 Replay ( ) : void
Результат void

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

Resets the state of all effects on a channel.
This function flushes the internal buffers of the effects. Effects are automatically reset by Position, except when called from a "mixtime" SYNCPROC.
public ResetEffects ( ) : void
Результат void

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

Sets the 3D attributes of a sample, stream, or MOD music channel with 3D functionality.
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 Set3DAttribute ( Channel3DMode mode, float min, float max, uint iAngle, uint oAngle, float outVloume ) : void
mode Channel3DMode The 3D processing mode.
min float The minimum distance.
max float The maximum distance.
iAngle uint The angle of the inside projection cone.
oAngle uint The angle of the outside projection cone.
outVloume float The delta-volume outside the outer projection cone.
Результат void

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

Sets the 3D position of a sample, stream, or MOD music channel with 3D functionality.
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 Set3DPosition ( Vector3 pos, Vector3 orientation, Vector3 vel ) : void
pos Vector3 Position of the sound.
orientation Vector3 Orientation of the sound.
vel Vector3 Velocity of the sound.
Результат void

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

Slides a channel's Freq from its current value to a new value.
public SetFreqAnimate ( float value, uint time ) : void
value float New sample rate value.
time uint /// The length of time (in milliseconds) that it should take for the to reach the /// value. ///
Результат void

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

Slides a channel's PanningPosition from its current value to a new value.
public SetPanningPositionAnimate ( float value, uint time ) : void
value float New volume value. -1 (full left) to +1 (full right), 0 = center.
time uint /// The length of time (in milliseconds) that it should take for the to /// reach the value. ///
Результат void

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

Slides a channel's Volume from its current value to a new value.
public SetVolumeAnimate ( float value, uint time ) : void
value float New volume value. 0 (silent) to 1.0 (full). This can go above 1.0 on decoding channels.
time uint /// The length of time (in milliseconds) that it should take for the to reach the /// value. ///
Результат void

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

Stops a sample, stream, MOD music, or recording, Stop can be used to stop a paused channel.
public Stop ( ) : void
Результат void

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

Unlocks a stream, MOD music or recording channel to the current thread.
Locking a channel prevents other threads from performing most functions on it, including buffer updates. Other threads wanting to access a locked channel will block until it is unlocked, so a channel should only be locked very briefly. A channel must be unlocked in the same thread that it was locked.
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 Unlock ( ) : void
Результат void