node-taglib-sharp / Exports / Id3v2RelativeVolumeFrameChannelData
Represents the relative volume data that applies to a specific channel of the audio.
• new Id3v2RelativeVolumeFrameChannelData(channel)
Constructs a new instance of relative volume information that applies to the provided audio channel.
| Name | Type | Description |
|---|---|---|
channel |
Id3v2RelativeVolumeFrameChannelType |
Channel that the relative volume information applies to |
• get channelType(): Id3v2RelativeVolumeFrameChannelType
Gets the channel that the current instance applies to.
Id3v2RelativeVolumeFrameChannelType
• get isSet(): boolean
Gets whether the current instance actually contains a relative volume adjustment.
boolean
• get peakBits(): number
Number of bits used to express the peak volume.
number
• set peakBits(value): void
Number of bits used to express the peak volume.
| Name | Type | Description |
|---|---|---|
value |
number |
Bits used to express the peak volume. Must be an integer betweenInclusive 1 and 64 |
void
• get peakVolume(): bigint
Value of the peak sample in the file. It's unclear exactly how this works, but the ID3v2.4 documentation explains this value as betweenInclusive 0 and 255 - but can be expressed using any number of bits (peakBits).
bigint
• set peakVolume(value): void
Value of the peak sample in the file. It's unclear exactly how this works, but the ID3v2.4 documentation explains this value as betweenInclusive 0 and 255 - but can be expressed using any number of bits (peakBits).
| Name | Type | Description |
|---|---|---|
value |
bigint |
Peak volume value. Must fit in the number of bits set in peakBits |
void
• get volumeAdjustment(): number
Volume adjustment of the track in dB.
number
• set volumeAdjustment(value): void
Volume adjustment of the track in dB. This value is expressed as a fixed-precision value betweenInclusive -64 and 64. Don't worry about the math, we'll do it for you.
| Name | Type | Description |
|---|---|---|
value |
number |
Volume adjustment. Must be between -64 and 64, inclusive. |
void
▸ render(): ByteVector
Generates a raw byte representation of the current instance.
▸ Static fromData(bytes): Id3v2RelativeVolumeFrameChannelData
Constructs a new instance from the raw bytes of channel data.
| Name | Type | Description |
|---|---|---|
bytes |
ByteVector |
Raw bytes that contain the channel data object. |