public class RelativeVolume
extends java.lang.Object
![]() |
![]() |
| Field | Description | |
|---|---|---|
| 1. | channel | the speaker channel whose volume will be adjusted. |
| 2. | volume | the amount to increase/decrease the volume in db. |
| 3. | num bits in peak volume | the number of bits used to store the peak volume. while the ID3v2.4 spec allows this to be any number between 0 and 255, the Beaglebuddy MP3 library only supports 0 and 32 bit peak volumes. |
| 4. | peak volume | the peak volume for the given speaker channel. |
| Modifier and Type | Class and Description |
|---|---|
static class |
RelativeVolume.Channel
valid ID3v2.4 channel types
|
static class |
RelativeVolume.PeakVolumeSize
Peak Volume sizes supported by the Beaglebuddy MP3 library.
|
| Constructor and Description |
|---|
RelativeVolume()
The default constructor is called when creating a relative volume.
|
RelativeVolume(RelativeVolume.Channel channel,
double volume,
RelativeVolume.PeakVolumeSize peakVolumeSize,
int peakVolume)
constructor.
|
| Modifier and Type | Method and Description |
|---|---|
RelativeVolume.Channel |
getChannel()
get the speaker channel whose volume is being adjusted.
|
int |
getPeakVolume()
get the peak volume for this speaker channel.
|
RelativeVolume.PeakVolumeSize |
getPeakVolumeSize()
set the number of bits used to store the peak volume.
|
double |
getVolume()
get the volume adjustment (in db) for this speaker channel.
|
void |
setChannel(RelativeVolume.Channel channel)
set the speaker channel whose volume is being adjusted.
|
void |
setPeakVolume(int peakVolume)
set the peak volume for this speaker channel.
|
void |
setPeakVolumeSize(RelativeVolume.PeakVolumeSize peakVolumeSize)
set the number of bits used to store the peak volume.
|
void |
setVolume(double volume)
set the amount of volume adjustment (in db) for this speaker channel..
Ex: +2.5 db Ex: -3.0 db |
java.lang.String |
toString()
get a string representation of a relative volume adjustment.
|
public RelativeVolume()
public RelativeVolume(RelativeVolume.Channel channel, double volume, RelativeVolume.PeakVolumeSize peakVolumeSize, int peakVolume)
channel - speaker channelvolume - volume (in db)peakVolumeSize - peak volume size.peakVolume - peak volume.public RelativeVolume.Channel getChannel()
setChannel(Channel)public void setChannel(RelativeVolume.Channel channel)
channel - the speaker channel whose volume is being adjusted.getChannel()public double getVolume()
setVolume(double)public void setVolume(double volume)
volume - the amount of volume (in db) to adjust this equalization level.java.lang.IllegalArgumentException - if the volume is not in the range of ±64 db.getVolume()public RelativeVolume.PeakVolumeSize getPeakVolumeSize()
setPeakVolumeSize(PeakVolumeSize)public void setPeakVolumeSize(RelativeVolume.PeakVolumeSize peakVolumeSize)
peakVolumeSize - the number of bits used to store the peak volume.getPeakVolumeSize()public void setPeakVolume(int peakVolume)
peakVolume - the peak volume for this speaker channel.getPeakVolume()public int getPeakVolume()
setPeakVolume(int)public java.lang.String toString()
toString in class java.lang.Object