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

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

#include <xactwavebank_ascii.h>

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

Classes

struct  Wave
 

Public Member Functions

 XACTWaveBank_ASCII (Common::SeekableReadStream *xwb)
 
 ~XACTWaveBank_ASCII ()
 
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 Member Functions

void load (Common::SeekableReadStream &xwb)
 

Private Attributes

Common::UString _name
 
bool _streaming
 
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 ASCII representation of an XWB wavebank file.

The non-Xbox versions of Jade Empire come with ASCII text files containing the meta-data part of the XWB files found in the Xbox version of the game. The actual sound files are plain Ogg Vorbis files in subdirectories.

To offer a unified interface for both variants of XWB, we treat the ASCII version as a wavebank managing the Ogg Vorbis files, just like the binary version manages its wave files.

See also xactwavebank_binary.h for the binary variant and xactwavebank.h for the abstract XACT WaveBank interface.

Definition at line 53 of file xactwavebank_ascii.h.

Constructor & Destructor Documentation

◆ XACTWaveBank_ASCII()

Sound::XACTWaveBank_ASCII::XACTWaveBank_ASCII ( Common::SeekableReadStream xwb)

Definition at line 42 of file xactwavebank_ascii.cpp.

References load().

Here is the call graph for this function:

◆ ~XACTWaveBank_ASCII()

Sound::XACTWaveBank_ASCII::~XACTWaveBank_ASCII ( )
inline

Definition at line 56 of file xactwavebank_ascii.h.

Member Function Documentation

◆ getName()

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

Return the internal name of the WaveBank.

Implements Sound::XACTWaveBank.

Definition at line 59 of file xactwavebank_ascii.h.

References _name.

◆ getWave()

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

Return the audio stream of a wave.

Implements Sound::XACTWaveBank.

Definition at line 54 of file xactwavebank_ascii.cpp.

References _waves, Common::UString::c_str(), Common::composeString(), Aurora::kFileTypeOGG, Sound::makeVorbisStream(), Sound::XACTWaveBank_ASCII::Wave::name, and ResMan.

Here is the call graph for this function:

◆ getWaveCount()

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

Return the number of wave files.

Implements Sound::XACTWaveBank.

Definition at line 50 of file xactwavebank_ascii.cpp.

References _waves.

◆ isStreaming()

bool Sound::XACTWaveBank_ASCII::isStreaming ( ) const
inlinevirtual

Is this WaveBank rating for streaming, or in-memory play?

Implements Sound::XACTWaveBank.

Definition at line 61 of file xactwavebank_ascii.h.

References _streaming.

◆ load()

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

Member Data Documentation

◆ _name

Common::UString Sound::XACTWaveBank_ASCII::_name
private

Definition at line 84 of file xactwavebank_ascii.h.

Referenced by getName(), and load().

◆ _streaming

bool Sound::XACTWaveBank_ASCII::_streaming
private

Definition at line 85 of file xactwavebank_ascii.h.

Referenced by isStreaming(), and load().

◆ _waves

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

Definition at line 87 of file xactwavebank_ascii.h.

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


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