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  Frequency : uint8_t { HZ_11025 , HZ_22050 , HZ_44100 }
 
enum class  Format : uint8_t { PCM , XMA , ADPCM , MP3 }
 

Public Member Functions

 XWV (std::span< const std::byte > xwvData)
 
 XWV (const std::string &xwvPath)
 
 operator bool () const
 
const std::vector< std::byte > & getData () 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 > data
 
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 16 of file XWV.h.

Member Enumeration Documentation

◆ Format

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

Definition at line 24 of file XWV.h.

◆ Frequency

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

Definition at line 18 of file XWV.h.

Constructor & Destructor Documentation

◆ XWV() [1/2]

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

Definition at line 9 of file XWV.cpp.

◆ XWV() [2/2]

XWV::XWV ( const std::string &  xwvPath)
explicit

Definition at line 33 of file XWV.cpp.

Member Function Documentation

◆ getBitsPerSample()

uint8_t XWV::getBitsPerSample ( ) const

Definition at line 68 of file XWV.cpp.

◆ getChannelCount()

uint8_t XWV::getChannelCount ( ) const

Definition at line 76 of file XWV.cpp.

◆ getData()

const std::vector< std::byte > & XWV::getData ( ) const

Definition at line 40 of file XWV.cpp.

◆ getDecodedSampleCount()

uint32_t XWV::getDecodedSampleCount ( ) const

Definition at line 44 of file XWV.cpp.

◆ getFormat()

XWV::Format XWV::getFormat ( ) const

Definition at line 64 of file XWV.cpp.

◆ getFrequency()

XWV::Frequency XWV::getFrequency ( ) const

Definition at line 72 of file XWV.cpp.

◆ getLeadingSampleCount()

uint16_t XWV::getLeadingSampleCount ( ) const

Definition at line 56 of file XWV.cpp.

◆ getLoopBlock()

uint16_t XWV::getLoopBlock ( ) const

Definition at line 52 of file XWV.cpp.

◆ getLoopStart()

int32_t XWV::getLoopStart ( ) const

Definition at line 48 of file XWV.cpp.

◆ getQuality()

uint8_t XWV::getQuality ( ) const

Definition at line 80 of file XWV.cpp.

◆ getTrailingSampleCount()

uint16_t XWV::getTrailingSampleCount ( ) const

Definition at line 60 of file XWV.cpp.

◆ operator bool()

XWV::operator bool ( ) const
explicit

Definition at line 36 of file XWV.cpp.

Member Data Documentation

◆ bitsPerSample

uint8_t sndpp::XWV::bitsPerSample {}
protected

Definition at line 67 of file XWV.h.

◆ channelCount

uint8_t sndpp::XWV::channelCount {}
protected

Definition at line 69 of file XWV.h.

◆ data

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

Definition at line 60 of file XWV.h.

◆ decodedSampleCount

uint32_t sndpp::XWV::decodedSampleCount {}
protected

Definition at line 61 of file XWV.h.

◆ format

Format sndpp::XWV::format {}
protected

Definition at line 66 of file XWV.h.

◆ frequency

Frequency sndpp::XWV::frequency {}
protected

Definition at line 68 of file XWV.h.

◆ leadingSampleCount

uint16_t sndpp::XWV::leadingSampleCount {}
protected

Definition at line 64 of file XWV.h.

◆ loopBlock

uint16_t sndpp::XWV::loopBlock {}
protected

Definition at line 63 of file XWV.h.

◆ loopStart

int32_t sndpp::XWV::loopStart {}
protected

Definition at line 62 of file XWV.h.

◆ opened

bool sndpp::XWV::opened = false
protected

Definition at line 72 of file XWV.h.

◆ quality

uint8_t sndpp::XWV::quality {}
protected

Definition at line 70 of file XWV.h.

◆ trailingSampleCount

uint16_t sndpp::XWV::trailingSampleCount {}
protected

Definition at line 65 of file XWV.h.


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