An AudioDecoder for WAV audio clips.
More...
#include <WAVAudioDecoder.hpp>
An AudioDecoder for WAV audio clips.
- Author
- Mark Lindner
◆ WAVAudioDecoder()
Construct a new WAVAudioDecoder that will read a WAV audio clip from the given DataReader.
◆ ~WAVAudioDecoder()
◆ decodeAudio()
Decode the audio clip itself.
This method must be called after decodeMetadata().
- Parameters
-
audio | The AudioClip in which to store the image data. |
- Exceptions
-
IOException | If an I/O error occurs, or if the supplied AudioClip is too small to accommodate the audio data. |
◆ decodeMetadata()
Decode the metadata for the audio clip.
This method must be called before decodeAudio().
- Exceptions
-
IOException | If an I/O error occurs. |
◆ getAudioFormat()
◆ getNumSamples()
uint32_t getNumSamples |
( |
| ) |
const |
|
inlineinherited |
Get the number of PCM samples in the audio data.
This method will return 0 if decodeMetadata() has not yet been called.
◆ readAudio()
void readAudio |
( |
ccxx::DataReader * |
reader, |
|
|
AudioClip * |
audio |
|
) |
| |
|
protectedvirtual |
This method must be implemented to perform the audio data decoding.
- Parameters
-
reader | The DataReader that the audio clip is being read from. |
audio | The AudioClip to store the audio data into. |
- Exceptions
-
IOException | If an I/O error occurs. |
Implements AudioDecoder.
◆ readMetadata()
void readMetadata |
( |
ccxx::DataReader * |
reader | ) |
|
|
protectedvirtual |
This method must be implemented to perform the audio metadata decoding.
- Parameters
-
reader | The DataReader that the audio clip is being read from. |
- Exceptions
-
IOException | If an I/O error occurs. |
Implements AudioDecoder.
◆ setAudioFormat()
This method should be called from readMetadata() to store the audio format information, once it has been determined.
◆ setNumSamples()
void setNumSamples |
( |
uint32_t |
numSamples | ) |
|
|
inlineprotectedinherited |
This method should be called from readMetadata() to store the number of PCM samples, once it has been determined.
The documentation for this class was generated from the following files: