|
xoreos
0.0.5
|
Class to hold audio resource data of an XWB wavebank file. More...
#include <xactwavebank_binary.h>


Classes | |
| struct | Wave |
| A wave within the wavebank. More... | |
Public Member Functions | |
| XACTWaveBank_Binary (Common::SeekableReadStream *xwb) | |
| ~XACTWaveBank_Binary () | |
| const Common::UString & | getName () const |
| Return the internal name of the WaveBank. More... | |
| bool | isStreaming () const |
| Is this WaveBank rating for streaming, or in-memory play? More... | |
| size_t | getWaveCount () const |
| Return the number of wave files. More... | |
| RewindableAudioStream * | getWave (size_t index) const |
| Return the audio stream of a wave. More... | |
Public Member Functions inherited from Sound::XACTWaveBank | |
| virtual | ~XACTWaveBank () |
Private Types | |
| enum | Codec { kCodecPCM = 0, kCodecADPCM = 1, kCodecWMA = 2 } |
| The codec of a wave within the wavebank. More... | |
Private Member Functions | |
| void | load (Common::SeekableReadStream &xwb) |
Private Attributes | |
| Common::ScopedPtr< Common::SeekableReadStream > | _xwb |
| Common::UString | _name |
| The internal name of this wavebank. */. More... | |
| uint32 | _flags |
| std::vector< Wave > | _waves |
Additional Inherited Members | |
Static Public Member Functions inherited from Sound::XACTWaveBank | |
| static XACTWaveBank * | load (const Common::UString &name) |
| Load an XACT WaveBank, of either ASCII or Binary format. More... | |
Class to hold audio resource data of an XWB wavebank file.
An XWB file is a wavebank, i.e. an archive containing one or more audio files. It's part of Microsoft's Cross-platform Audio Creation Tool (XACT), and commonly used together with XSB files, which define sounds and events.
XWB files are found in the Xbox version of Jade Empire.
Only version 3 of the XWB format is supported, because that's the version used by Jade Empire.
Interestingly enough, the non-Xbox versions of Jade Empire do not use XWB files, instead opting for a collection of Ogg Vorbis files in a directory, plus text files containing the ASCII representation of the information in XWB (and XSB) files. See xactwavebank_ascii.h for this variant.
See also xactwavebank.h for the abstract XACT WaveBank interface.
Definition at line 58 of file xactwavebank_binary.h.
|
private |
The codec of a wave within the wavebank.
| Enumerator | |
|---|---|
| kCodecPCM | Containerless PCM stream. |
| kCodecADPCM | Containerless Xbox ADPCM stream. |
| kCodecWMA | ASF container with a WMA stream. |
Definition at line 76 of file xactwavebank_binary.h.
| Sound::XACTWaveBank_Binary::XACTWaveBank_Binary | ( | Common::SeekableReadStream * | xwb | ) |
|
inline |
Definition at line 61 of file xactwavebank_binary.h.
|
inlinevirtual |
Return the internal name of the WaveBank.
Implements Sound::XACTWaveBank.
Definition at line 64 of file xactwavebank_binary.h.
References _name.
|
virtual |
Return the audio stream of a wave.
Implements Sound::XACTWaveBank.
Definition at line 97 of file xactwavebank_binary.cpp.
References _waves, _xwb, Sound::XACTWaveBank_Binary::Wave::bitRate, Common::UString::c_str(), Sound::XACTWaveBank_Binary::Wave::channels, Sound::XACTWaveBank_Binary::Wave::codec, Common::composeString(), Sound::FLAG_16BITS, Sound::FLAG_LITTLE_ENDIAN, Sound::FLAG_UNSIGNED, Sound::kADPCMXbox, kCodecADPCM, kCodecPCM, kCodecWMA, Sound::makeADPCMStream(), Sound::makeASFStream(), Sound::makePCMStream(), Sound::XACTWaveBank_Binary::Wave::offset, Sound::XACTWaveBank_Binary::Wave::samplingRate, and Sound::XACTWaveBank_Binary::Wave::size.

|
virtual |
Return the number of wave files.
Implements Sound::XACTWaveBank.
Definition at line 93 of file xactwavebank_binary.cpp.
References _waves.
|
virtual |
Is this WaveBank rating for streaming, or in-memory play?
Implements Sound::XACTWaveBank.
Definition at line 89 of file xactwavebank_binary.cpp.
References _flags, and Sound::kXWBFlagsStreaming.
|
private |
Definition at line 142 of file xactwavebank_binary.cpp.
References _flags, _name, _waves, Common::composeString(), Common::debugTag(), kCodecADPCM, kCodecPCM, kCodecWMA, Common::kEncodingASCII, Sound::kSegmentBankData, Sound::kSegmentEntryMetaData, Sound::kSegmentMAX, Sound::kSegmentWaveData, Sound::kXWBFlagsCompact, MKTAG, Sound::Segment::offset, Common::readStringFixed(), Common::ReadStream::readUint32BE(), Common::ReadStream::readUint32LE(), Common::SeekableReadStream::seek(), Sound::Segment::size, and Common::SeekableReadStream::skip().
Referenced by XACTWaveBank_Binary().


|
private |
Definition at line 103 of file xactwavebank_binary.h.
Referenced by isStreaming(), and load().
|
private |
The internal name of this wavebank. */.
Definition at line 102 of file xactwavebank_binary.h.
|
private |
Definition at line 105 of file xactwavebank_binary.h.
Referenced by getWave(), getWaveCount(), and load().
|
private |
Definition at line 100 of file xactwavebank_binary.h.
Referenced by getWave(), and XACTWaveBank_Binary().
1.8.14