C# Class xZune.Bass.Channel

Inheritance: HandleObject, IChannel, IChannelInternal
Afficher le fichier Open project: higankanshi/xZune.Bass Class Usage Examples

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
AttachEvent ( ) : void
Channel ( ) : System
Free ( ) : void

Private Methods

Méthode Description
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

Method Details

AttachEvent() protected méthode

protected AttachEvent ( ) : void
Résultat void

Channel() protected méthode

protected Channel ( ) : System
Résultat System

Free() protected abstract méthode

protected abstract Free ( ) : void
Résultat void

Get3DAttribute() public méthode

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.
Résultat void

Get3DPosition() public méthode

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.
Résultat void

GetDate() public méthode

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
Résultat uint

GetLevelEx() public méthode

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. ///
Résultat float[]

Lock() public méthode

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
Résultat void

Pause() public méthode

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
Résultat void

PauseTest() public méthode

public PauseTest ( ) : System.Threading.Tasks.Task
Résultat System.Threading.Tasks.Task

Play() public méthode

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
Résultat void

PlayTest() public méthode

public PlayTest ( ) : System.Threading.Tasks.Task
Résultat System.Threading.Tasks.Task

RemoveEffect() public méthode

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.
Résultat void

Replay() public méthode

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
Résultat void

ResetEffects() public méthode

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
Résultat void

Set3DAttribute() public méthode

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.
Résultat void

Set3DPosition() public méthode

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.
Résultat void

SetFreqAnimate() public méthode

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. ///
Résultat void

SetPanningPositionAnimate() public méthode

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. ///
Résultat void

SetVolumeAnimate() public méthode

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. ///
Résultat void

Stop() public méthode

Stops a sample, stream, MOD music, or recording, Stop can be used to stop a paused channel.
public Stop ( ) : void
Résultat void

Unlock() public méthode

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
Résultat void