xoreos  0.0.5
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Sound::XACTWaveBank_Binary Class Reference

Class to hold audio resource data of an XWB wavebank file. More...

#include <xactwavebank_binary.h>

Inheritance diagram for Sound::XACTWaveBank_Binary:
Inheritance graph
[legend]
Collaboration diagram for Sound::XACTWaveBank_Binary:
Collaboration graph
[legend]

Classes

struct  Wave
 A wave within the wavebank. More...
 

Public Member Functions

 XACTWaveBank_Binary (Common::SeekableReadStream *xwb)
 
 ~XACTWaveBank_Binary ()
 
const Common::UStringgetName () 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...
 
RewindableAudioStreamgetWave (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 XACTWaveBankload (const Common::UString &name)
 Load an XACT WaveBank, of either ASCII or Binary format. More...
 

Detailed Description

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.

Member Enumeration Documentation

◆ Codec

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.

Constructor & Destructor Documentation

◆ XACTWaveBank_Binary()

Sound::XACTWaveBank_Binary::XACTWaveBank_Binary ( Common::SeekableReadStream xwb)

Definition at line 83 of file xactwavebank_binary.cpp.

References _xwb, and load().

Here is the call graph for this function:

◆ ~XACTWaveBank_Binary()

Sound::XACTWaveBank_Binary::~XACTWaveBank_Binary ( )
inline

Definition at line 61 of file xactwavebank_binary.h.

Member Function Documentation

◆ getName()

const Common::UString& Sound::XACTWaveBank_Binary::getName ( ) const
inlinevirtual

Return the internal name of the WaveBank.

Implements Sound::XACTWaveBank.

Definition at line 64 of file xactwavebank_binary.h.

References _name.

◆ getWave()

RewindableAudioStream * Sound::XACTWaveBank_Binary::getWave ( size_t  index) const
virtual

◆ getWaveCount()

size_t Sound::XACTWaveBank_Binary::getWaveCount ( ) const
virtual

Return the number of wave files.

Implements Sound::XACTWaveBank.

Definition at line 93 of file xactwavebank_binary.cpp.

References _waves.

◆ isStreaming()

bool Sound::XACTWaveBank_Binary::isStreaming ( ) const
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.

◆ load()

void Sound::XACTWaveBank_Binary::load ( Common::SeekableReadStream xwb)
private

Member Data Documentation

◆ _flags

uint32 Sound::XACTWaveBank_Binary::_flags
private

Definition at line 103 of file xactwavebank_binary.h.

Referenced by isStreaming(), and load().

◆ _name

Common::UString Sound::XACTWaveBank_Binary::_name
private

The internal name of this wavebank. */.

Definition at line 102 of file xactwavebank_binary.h.

Referenced by getName(), and load().

◆ _waves

std::vector<Wave> Sound::XACTWaveBank_Binary::_waves
private

Definition at line 105 of file xactwavebank_binary.h.

Referenced by getWave(), getWaveCount(), and load().

◆ _xwb

Common::ScopedPtr<Common::SeekableReadStream> Sound::XACTWaveBank_Binary::_xwb
private

Definition at line 100 of file xactwavebank_binary.h.

Referenced by getWave(), and XACTWaveBank_Binary().


The documentation for this class was generated from the following files: