Used with BASS_ChannelSetFX(Int32, BASSFXType, Int32), BASS_FXSetParameters(Int32, IntPtr) and BASS_FXGetParameters(Int32, IntPtr) to retrieve and set the parameters of the DSP effect Volume Envelope.
Inheritance Hierarchy
Un4seen.Bass.AddOn.FxBASS_BFX_VOLUME_ENV
Namespace: Un4seen.Bass.AddOn.Fx
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax
[SerializableAttribute] [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)] public sealed class BASS_BFX_VOLUME_ENV
The BASS_BFX_VOLUME_ENV type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() | BASS_BFX_VOLUME_ENV |
Default constructor.
|
![]() | BASS_BFX_VOLUME_ENV(Int32) |
Constructor assigning the number of volume envelope nodes to use.
|
![]() | BASS_BFX_VOLUME_ENV(BASS_BFX_ENV_NODE) |
Constructor assigning the volume envelope nodes to use.
|
Methods
Name | Description | |
---|---|---|
![]() | Dispose |
Implements the IDisposable interface.
|
![]() | Finalize |
Default Finilizer.
(Overrides ObjectFinalize.) |
Fields
Name | Description | |
---|---|---|
![]() | bFollow |
Follow the source position (default is )?
|
![]() | lChannel |
A BASSFXChan flag to define on which channels to apply the effect.
Default: -1 (BASS_BFX_CHANALL) - all channels. |
![]() | lNodeCount |
The number of nodes contained in the pNodes array.
|
![]() | pNodes |
The array of envelope nodes (the first node must be at position 0.0).
|
Remarks
Make sure that the first node is at position 0.0.
Envelopes are applied on top of the channel's attributes, as set via BASS_ChannelSetAttribute(Int32, BASSAttribute, Single). The final volume is a product of the channel attribute and the envelope.
Examples
int fx = Bass.BASS_ChannelSetFX(source, BASSFXType.BASS_FX_BFX_VOLUME_ENV, 0); BASS_BFX_VOLUME_ENV ve = new BASS_BFX_VOLUME_ENV( new BASS_BFX_ENV_NODE(0.0, 1f), new BASS_BFX_ENV_NODE(5.0, 1f), new BASS_BFX_ENV_NODE(7.0, 0.5f), new BASS_BFX_ENV_NODE(12.0, 0.5f), new BASS_BFX_ENV_NODE(14.0, 1f)); // which is the same as: BASS_BFX_ENV_NODE[] en = new BASS_BFX_ENV_NODE[5]; en[0].pos = 0.0; en[0].val = 1f; en[1].pos = 5.0; en[2].val = 1f; en[3].pos = 7.0; en[3].val = 0.5f; en[4].pos = 12.0; en[4].val = 0.5f; en[5].pos = 14.0; en[5].val = 1f; ve = new BASS_BFX_VOLUME_ENV(en); Bass.BASS_FXSetParameters(fx, ve);
BASS_BFX_VOLUME_ENV ve = new BASS_BFX_VOLUME_ENV(); if (Bass.BASS_FXGetParameters(fx, ve)) { foreach (BASS_BFX_ENV_NODE node in ve.pNodes) Console.WriteLine(node); }
See Also