Show / Hide Table of Contents

Class SoundChannelId

A wrapper around System.Int32 to hold channel id. Channel ids represent the mix channel we play sound effects on. You can use this channel id to control the playing sound volume, panning, duration ect. Note that there are two special channel ids you should watch for: AllChannels (-1), used to affect all channels at once, and Invalid (-2), which is what you get when engine couldn't play a sound.

Inheritance
System.Object
SoundChannelId
Namespace: BonEngineSharp.Defs
Assembly: BonEngineSharp.dll
Syntax
public sealed class SoundChannelId : ValueType

Fields

AllChannels

Channel id for actions on all channels.

Declaration
public static readonly SoundChannelId AllChannels
Field Value
Type Description
SoundChannelId

Invalid

Invalid channel id, for when we fail to allocate channel.

Declaration
public static readonly SoundChannelId Invalid
Field Value
Type Description
SoundChannelId

Properties

IsValid

Is it a valid value?

Declaration
public bool IsValid { get; }
Property Value
Type Description
System.Boolean

IsValidSingle

Is it a valid single channel?

Declaration
public bool IsValidSingle { get; }
Property Value
Type Description
System.Boolean

Operators

Implicit(SoundChannelId to Int32)

Implicitly converts a Record to a System.Int32.

Declaration
public static implicit operator int (SoundChannelId record)
Parameters
Type Name Description
SoundChannelId record

The Record to convert.

Returns
Type Description
System.Int32

A System.Int32 that is the specified Record's value.

Implicit(Int32 to SoundChannelId)

Implicitly converts a System.Int32 to a Record.

Declaration
public static implicit operator SoundChannelId(int value)
Parameters
Type Name Description
System.Int32 value

The System.Int32 to convert.

Returns
Type Description
SoundChannelId

A new Record with the specified value.

Back to top Generated by DocFX