The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Audio::TagLib::ID3v2::RelativeVolumeFrame - An ID3v2 relative volume adjustment frame implementation

SYNOPSIS

  use Audio::TagLib::ID3v2::RelativeVolumeFrame;
  
  my $i = Audio::TagLib::ID3v2::RelativeVolumeFrame->new(
    Audio::TagLib::ByteVector->new(""));
  $i->setChannelType("MasterVolume");
  print $i->channelType(), "\n"; # got "MasterVolume"

DESCRIPTION

This is an implementation of ID3v2 relative volume adjustment. The presense of this frame makes it possible to specify an increase in volume for an audio file or specific audio tracks in that file.

Multiple relative volume adjustment frames may be present in the tag each with a unique identification and describing volume adjustment for different channel types.

new()

Constructs a RelativeVolumeFrame. The relevant data should be set manually.

new(ByteVector $data)

Constructs a RelativeVolumeFrame based on the contents of $data.

DESTROY()

Destroys the RelativeVolumeFrame instance.

String toString()

Returns the frame's identification.

see identification()

LIST channles()

Returns a list of channels with information currently in the frame.

NOTE This should be a list of PV which indicates the ChannelType.

see %_ChannelType

PV channelType()

Always returns master volume.

deprecated

void setChannelType(PV $t)

This method no longer has any effect.

deprecated

IV volumeAdjustmentIndex(PV $type = "MasterVolume")

Returns the relative volume adjustment "index". As indicated by the ID3v2 standard this is a 16-bit signed integer that reflects the decibils of adjustment when divided by 512.

This defaults to returning the value for the master volume channel if available and returns 0 if the specified channel does not exist.

see setVolumeAdjustmentIndex()

see volumeAjustment()

void setVolumeAdjustmentIndex(IV $index, PV $type = "MasterVolume")

Set the volume adjustment to $index. As indicated by the ID3v2 standard this is a 16-bit signed integer that reflects the decibils of adjustment when divided by 512.

By default this sets the value for the master volume.

see volumeAdjustmentIndex()

see setVolumeAdjustment()

<NV volumeAdjustment(PV $type = "MasterVolume")>

Returns the relative volume adjustment in decibels.

NOTE Because this is actually stored internally as an "index" to this value the value returned by this method may not be identical to the value set using setVolumeAdjustment().

This defaults to returning the value for the master volume channel if available and returns 0 if the specified channel does not exist.

see setVolumeAdjustment()

see volumeAdjustmentIndex()

void setVolumeAdjustment(NV $adjustment, PV $type = "MasterVolume")

Set the relative volume adjustment in decibels to $adjustment.

By default this sets the value for the master volume.

NOTE Because this is actually stored internally as an "index" to this value the value set by this method may not be identical to the one returned by volumeAdjustment().

see setVolumeAdjustment()

see volumeAdjustmentIndex()

PeakVolume peakVolume(PV $type = "MasterVolume")

Returns the peak volume (represented as a length and a string of bits).

This defaults to returning the value for the master volume channel if available and returns 0 if the specified channel does not exist.

see setPeakVolume()

setPeakVolume(PeakVolume $peak, PV $type = "MasterVolume")

Sets the peak volume to $peak.

By default this sets the value for the master volume.

see peakVolume()

%_ChannelType

This indicates the type of volume adjustment that should be applied. keys %Audio::TagLib::ID3v2::RelativeVolumeFrame::_ChannelType lists all available values used in Perl code.

EXPORT

None by default.

SEE ALSO

Audio::TagLib Frame

AUTHOR

Dongxu Ma, <dongxu@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2005 by Dongxu Ma

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available.