SourcePP
Several modern C++20 libraries for sanely parsing Valve's formats.
Loading...
Searching...
No Matches
sndpp::XWV Class Reference

#include <XWV.h>

Collaboration diagram for sndpp::XWV:

Public Types

enum class  Version : uint32_t { V0 = 20 , V1 = sourcepp::parser::binary::makeFourCC("XWV1") , V4 = sourcepp::parser::binary::makeFourCC("XWV ") }
enum class  Format : uint8_t { PCM = 0 , XMA = 1 , XMA2 = 2 , MP3 = 3 }
enum class  Frequency : uint8_t { HZ_11025 = 0 , HZ_22050 = 1 , HZ_44100 = 2 }

Public Member Functions

 XWV (std::span< const std::byte > xwvData)
 XWV (const std::filesystem::path &xwvPath)
 operator bool () const
Version getVersion () const
const std::vector< std::byte > & getAudioDataRaw () const
const std::vector< std::byte > & getStaticData () const
const std::vector< std::byte > & getValveData () const
const std::vector< std::byte > & getSeekTableData () const
uint32_t getDecodedSampleCount () const
int32_t getLoopStart () const
uint16_t getLoopBlock () const
uint16_t getLeadingSampleCount () const
uint16_t getTrailingSampleCount () const
Format getFormat () const
uint8_t getBitsPerSample () const
Frequency getFrequency () const
uint8_t getChannelCount () const
uint8_t getQuality () const

Protected Attributes

std::vector< std::byte > audioData
std::vector< std::byte > staticData
std::vector< std::byte > valveData
std::vector< std::byte > seekTable
Version version
uint32_t decodedSampleCount
int32_t loopStart
uint16_t loopBlock
uint16_t leadingSampleCount
uint16_t trailingSampleCount
Format format
uint8_t bitsPerSample
Frequency frequency
uint8_t channelCount
uint8_t quality
bool opened = false

Detailed Description

Definition at line 11 of file XWV.h.

Member Enumeration Documentation

◆ Format

enum class sndpp::XWV::Format : uint8_t
strong
Enumerator
PCM 
XMA 
XMA2 
MP3 

Definition at line 19 of file XWV.h.

◆ Frequency

enum class sndpp::XWV::Frequency : uint8_t
strong
Enumerator
HZ_11025 
HZ_22050 
HZ_44100 

Definition at line 26 of file XWV.h.

◆ Version

enum class sndpp::XWV::Version : uint32_t
strong
Enumerator
V0 
V1 
V4 

Definition at line 13 of file XWV.h.

Constructor & Destructor Documentation

◆ XWV() [1/2]

XWV::XWV ( std::span< const std::byte > xwvData)
explicit

Definition at line 22 of file XWV.cpp.

◆ XWV() [2/2]

XWV::XWV ( const std::filesystem::path & xwvPath)
explicit

Definition at line 137 of file XWV.cpp.

Member Function Documentation

◆ getAudioDataRaw()

const std::vector< std::byte > & XWV::getAudioDataRaw ( ) const
nodiscard

Definition at line 148 of file XWV.cpp.

◆ getBitsPerSample()

uint8_t XWV::getBitsPerSample ( ) const
nodiscard

Definition at line 188 of file XWV.cpp.

◆ getChannelCount()

uint8_t XWV::getChannelCount ( ) const
nodiscard

Definition at line 196 of file XWV.cpp.

◆ getDecodedSampleCount()

uint32_t XWV::getDecodedSampleCount ( ) const
nodiscard

Definition at line 164 of file XWV.cpp.

◆ getFormat()

XWV::Format XWV::getFormat ( ) const
nodiscard

Definition at line 184 of file XWV.cpp.

◆ getFrequency()

XWV::Frequency XWV::getFrequency ( ) const
nodiscard

Definition at line 192 of file XWV.cpp.

◆ getLeadingSampleCount()

uint16_t XWV::getLeadingSampleCount ( ) const
nodiscard

Definition at line 176 of file XWV.cpp.

◆ getLoopBlock()

uint16_t XWV::getLoopBlock ( ) const
nodiscard

Definition at line 172 of file XWV.cpp.

◆ getLoopStart()

int32_t XWV::getLoopStart ( ) const
nodiscard

Definition at line 168 of file XWV.cpp.

◆ getQuality()

uint8_t XWV::getQuality ( ) const
nodiscard

Definition at line 200 of file XWV.cpp.

◆ getSeekTableData()

const std::vector< std::byte > & XWV::getSeekTableData ( ) const
nodiscard

Definition at line 160 of file XWV.cpp.

◆ getStaticData()

const std::vector< std::byte > & XWV::getStaticData ( ) const
nodiscard

Definition at line 152 of file XWV.cpp.

◆ getTrailingSampleCount()

uint16_t XWV::getTrailingSampleCount ( ) const
nodiscard

Definition at line 180 of file XWV.cpp.

◆ getValveData()

const std::vector< std::byte > & XWV::getValveData ( ) const
nodiscard

Definition at line 156 of file XWV.cpp.

◆ getVersion()

XWV::Version XWV::getVersion ( ) const
nodiscard

Definition at line 144 of file XWV.cpp.

◆ operator bool()

XWV::operator bool ( ) const
explicit

Definition at line 140 of file XWV.cpp.

Member Data Documentation

◆ audioData

std::vector<std::byte> sndpp::XWV::audioData
protected

Definition at line 69 of file XWV.h.

◆ bitsPerSample

uint8_t sndpp::XWV::bitsPerSample
protected

Definition at line 81 of file XWV.h.

◆ channelCount

uint8_t sndpp::XWV::channelCount
protected

Definition at line 83 of file XWV.h.

◆ decodedSampleCount

uint32_t sndpp::XWV::decodedSampleCount
protected

Definition at line 75 of file XWV.h.

◆ format

Format sndpp::XWV::format
protected

Definition at line 80 of file XWV.h.

◆ frequency

Frequency sndpp::XWV::frequency
protected

Definition at line 82 of file XWV.h.

◆ leadingSampleCount

uint16_t sndpp::XWV::leadingSampleCount
protected

Definition at line 78 of file XWV.h.

◆ loopBlock

uint16_t sndpp::XWV::loopBlock
protected

Definition at line 77 of file XWV.h.

◆ loopStart

int32_t sndpp::XWV::loopStart
protected

Definition at line 76 of file XWV.h.

◆ opened

bool sndpp::XWV::opened = false
protected

Definition at line 86 of file XWV.h.

◆ quality

uint8_t sndpp::XWV::quality
protected

Definition at line 84 of file XWV.h.

◆ seekTable

std::vector<std::byte> sndpp::XWV::seekTable
protected

Definition at line 72 of file XWV.h.

◆ staticData

std::vector<std::byte> sndpp::XWV::staticData
protected

Definition at line 70 of file XWV.h.

◆ trailingSampleCount

uint16_t sndpp::XWV::trailingSampleCount
protected

Definition at line 79 of file XWV.h.

◆ valveData

std::vector<std::byte> sndpp::XWV::valveData
protected

Definition at line 71 of file XWV.h.

◆ version

Version sndpp::XWV::version
protected

Definition at line 74 of file XWV.h.


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