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

An FEV file is used to define events for the FMOD system and categorize them. More...

#include <fevfile.h>

Collaboration diagram for Aurora::FEVFile:
Collaboration graph
[legend]

Classes

struct  Category
 A category which is organized hierarchically. More...
 
struct  Event
 An FMOD event. More...
 
struct  EventCategory
 An event category for storing events. More...
 
struct  Property
 Some objects in FMOD can have generic properties. More...
 
struct  SoundDefinition
 A sound definition. More...
 
struct  WaveBank
 Reference to an external wave bank. More...
 

Public Types

enum  StreamingType { kDecompressIntoMemory, kLoadIntoMemory, kStreamFromDisk }
 Possible types of streaming for FMOD. More...
 
enum  PlayMode {
  kSequential = 0, kRandom, kRandomNoRepeat, kSequentialNoRepeat,
  kShuffle, kProgrammerSelected
}
 Possible Play modes. More...
 
enum  PropertyType { kPropertyInt = 0, kPropertyFloat, kPropertyString }
 Possible Property types. More...
 

Public Member Functions

 FEVFile (const Common::UString &resRef)
 
 FEVFile (Common::SeekableReadStream &fev)
 
const Common::UStringgetBankName ()
 
const std::vector< WaveBank > & getWaveBanks ()
 
const std::vector< Category > & getCategories ()
 

Private Member Functions

void load (Common::SeekableReadStream &fev)
 
void readCategory (Common::SeekableReadStream &fev)
 Read a general category. More...
 
void readEventCategory (Common::SeekableReadStream &fev)
 Read a category for events. More...
 
void readEvent (Common::SeekableReadStream &fev)
 Read an event. More...
 
std::map< Common::UString, PropertyreadProperties (Common::SeekableReadStream &fev)
 Read properties. More...
 
Common::UString readLengthPrefixedString (Common::SeekableReadStream &fev)
 Read an FEV length prefixed string. More...
 

Private Attributes

Common::UString _bankName
 
std::vector< WaveBank_waveBanks
 
std::vector< Category_categories
 
std::vector< Event_events
 
std::vector< SoundDefinition_definitions
 

Detailed Description

An FEV file is used to define events for the FMOD system and categorize them.

There is currently only one relevant version of fev files with the FourCC "FEV1".

Definition at line 43 of file fevfile.h.

Member Enumeration Documentation

◆ PlayMode

Possible Play modes.

Enumerator
kSequential 
kRandom 
kRandomNoRepeat 
kSequentialNoRepeat 
kShuffle 
kProgrammerSelected 

Definition at line 53 of file fevfile.h.

◆ PropertyType

Possible Property types.

Enumerator
kPropertyInt 
kPropertyFloat 
kPropertyString 

Definition at line 63 of file fevfile.h.

◆ StreamingType

Possible types of streaming for FMOD.

Enumerator
kDecompressIntoMemory 
kLoadIntoMemory 
kStreamFromDisk 

Definition at line 46 of file fevfile.h.

Constructor & Destructor Documentation

◆ FEVFile() [1/2]

Aurora::FEVFile::FEVFile ( const Common::UString resRef)

Definition at line 34 of file fevfile.cpp.

References Common::UString::c_str(), Aurora::kFileTypeFEV, load(), and ResMan.

Here is the call graph for this function:

◆ FEVFile() [2/2]

Aurora::FEVFile::FEVFile ( Common::SeekableReadStream fev)

Definition at line 43 of file fevfile.cpp.

References load().

Here is the call graph for this function:

Member Function Documentation

◆ getBankName()

const Common::UString & Aurora::FEVFile::getBankName ( )

Definition at line 47 of file fevfile.cpp.

References _bankName.

◆ getCategories()

const std::vector< FEVFile::Category > & Aurora::FEVFile::getCategories ( )

Definition at line 55 of file fevfile.cpp.

References _categories.

◆ getWaveBanks()

const std::vector< FEVFile::WaveBank > & Aurora::FEVFile::getWaveBanks ( )

Definition at line 51 of file fevfile.cpp.

References _waveBanks.

◆ load()

void Aurora::FEVFile::load ( Common::SeekableReadStream fev)
private

◆ readCategory()

void Aurora::FEVFile::readCategory ( Common::SeekableReadStream fev)
private

Read a general category.

Definition at line 136 of file fevfile.cpp.

References _categories, Aurora::FEVFile::Category::pitch, Common::ReadStream::readIEEEFloatLE(), readLengthPrefixedString(), Common::ReadStream::readUint32LE(), Common::SeekableReadStream::skip(), and Aurora::FEVFile::Category::volume.

Referenced by load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readEvent()

void Aurora::FEVFile::readEvent ( Common::SeekableReadStream fev)
private

Read an event.

Definition at line 171 of file fevfile.cpp.

References _events, Common::ReadStream::readIEEEFloatLE(), readLengthPrefixedString(), readProperties(), Common::ReadStream::readUint32LE(), and Common::SeekableReadStream::skip().

Referenced by readEventCategory().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readEventCategory()

void Aurora::FEVFile::readEventCategory ( Common::SeekableReadStream fev)
private

Read a category for events.

Definition at line 153 of file fevfile.cpp.

References readEvent(), readLengthPrefixedString(), readProperties(), and Common::ReadStream::readUint32LE().

Referenced by load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readLengthPrefixedString()

Common::UString Aurora::FEVFile::readLengthPrefixedString ( Common::SeekableReadStream fev)
private

Read an FEV length prefixed string.

Definition at line 250 of file fevfile.cpp.

References Common::kEncodingASCII, Common::readStringFixed(), and Common::ReadStream::readUint32LE().

Referenced by load(), readCategory(), readEvent(), readEventCategory(), and readProperties().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readProperties()

std::map< Common::UString, FEVFile::Property > Aurora::FEVFile::readProperties ( Common::SeekableReadStream fev)
private

Read properties.

Definition at line 223 of file fevfile.cpp.

References kPropertyFloat, kPropertyInt, kPropertyString, Common::ReadStream::readIEEEFloatLE(), readLengthPrefixedString(), Common::ReadStream::readSint32LE(), Common::ReadStream::readUint32LE(), and Aurora::FEVFile::Property::type.

Referenced by readEvent(), and readEventCategory().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _bankName

Common::UString Aurora::FEVFile::_bankName
private

Definition at line 175 of file fevfile.h.

Referenced by getBankName(), and load().

◆ _categories

std::vector<Category> Aurora::FEVFile::_categories
private

Definition at line 178 of file fevfile.h.

Referenced by getCategories(), and readCategory().

◆ _definitions

std::vector<SoundDefinition> Aurora::FEVFile::_definitions
private

Definition at line 180 of file fevfile.h.

Referenced by load().

◆ _events

std::vector<Event> Aurora::FEVFile::_events
private

Definition at line 179 of file fevfile.h.

Referenced by readEvent().

◆ _waveBanks

std::vector<WaveBank> Aurora::FEVFile::_waveBanks
private

Definition at line 177 of file fevfile.h.

Referenced by getWaveBanks(), and load().


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