WavPackage
Leave feedback
On this page
Inheritance: java.lang.Object, com.groupdocs.metadata.core.MetadataPackage, com.groupdocs.metadata.core.CustomPackage
public final class WavPackage extends CustomPackage
Represents a native metadata package in a WAV audio file.
This code sample shows how to extract technical audio information from a WAV file.
try (Metadata metadata = new Metadata(Constants.InputWav)) { WavRootPackage root = metadata.getRootPackageGeneric(); if (root.getWavPackage() != null) { System.out.println(root.getWavPackage().getAudioFormat()); System.out.println(root.getWavPackage().getBitsPerSample()); System.out.println(root.getWavPackage().getBlockAlign()); System.out.println(root.getWavPackage().getByteRate()); System.out.println(root.getWavPackage().getNumberOfChannels()); System.out.println(root.getWavPackage().getSampleRate()); } }
| Constructor | Description |
|---|---|
| WavPackage() | Initializes a new instance of the WavPackage class. |
| Method | Description |
|---|---|
| getAudioFormat() | Gets the audio format. |
| getNumberOfChannels() | Gets the number of channels. |
| getSampleRate() | Gets the sample rate. |
| getByteRate() | Gets the byte rate. |
| getBlockAlign() | Gets the block align. |
| getBitsPerSample() | Gets the bits per sample value. |
public WavPackage()
Initializes a new instance of the WavPackage class.
public final int getAudioFormat()
Gets the audio format. PCM = 1 (i.e. Linear quantization). Values other than 1 indicate some form of compression.
Returns: int - The audio format.
public final int getNumberOfChannels()
Gets the number of channels.
Returns: int - The number of channels.
public final int getSampleRate()
Gets the sample rate.
Returns: int - The sample rate.
public final int getByteRate()
Gets the byte rate.
Returns: int - The byte rate.
public final int getBlockAlign()
Gets the block align.
Returns: int - The block align.
public final int getBitsPerSample()
Gets the bits per sample value.
Returns: int - The bits per sample value.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.