coastline 0.0.4
Loading...
Searching...
No Matches
EarWaveSample Class Reference

A wave file loaded whole into memory, which a preset registers and sample playbacks share. More...

#include <wavesample.h>

Public Member Functions

 EarWaveSample ()
 Initialise empty sample storage and file-source defaults without assigning a wave format.
 ~EarWaveSample ()
 Free allocated sample storage and subtract its tracked byte count from the sample budget.
int LoadWaveSample (const void *source, EarWaveSampleSource sourceKind)
 Load wave samples into allocated storage with sample-memory budget accounting.
char * GetWaveSampleBuffer () const
DWORD GetWaveSampleByteCount () const
EarWaveFormat CopyWaveSampleFormat () const

Detailed Description

A wave file loaded whole into memory, which a preset registers and sample playbacks share.

Constructor & Destructor Documentation

◆ EarWaveSample()

EarWaveSample::EarWaveSample ( )

Initialise empty sample storage and file-source defaults without assigning a wave format.

Ghidra address:
EAR: 0x10009520

◆ ~EarWaveSample()

EarWaveSample::~EarWaveSample ( )

Free allocated sample storage and subtract its tracked byte count from the sample budget.

Borrowing sample playbacks must be released before destruction.

Ghidra address:
EAR: 0x10009554

Member Function Documentation

◆ LoadWaveSample()

int EarWaveSample::LoadWaveSample ( const void * source,
EarWaveSampleSource sourceKind )

Load wave samples into allocated storage with sample-memory budget accounting.

Use an empty sample object; loading does not release a previous sample allocation first. Failed loads retain any budget reservation until destruction.

Parameters
sourceA non-null terminated path or complete readable RIFF image, borrowed during load.
sourceKindHow source is given.
Returns
One on success; zero with an EAR error for format, I/O, budget, or allocation failure.
Ghidra address:
EAR: 0x1000958a

◆ GetWaveSampleBuffer()

char * EarWaveSample::GetWaveSampleBuffer ( ) const
Returns
Borrowed sample storage, valid until destruction or replacement, or null when empty.
Ghidra address:
EAR: 0x100098b1

◆ GetWaveSampleByteCount()

DWORD EarWaveSample::GetWaveSampleByteCount ( ) const
Returns
The bytes of the samples.
Ghidra address:
EAR: 0x100098c1

◆ CopyWaveSampleFormat()

EarWaveFormat EarWaveSample::CopyWaveSampleFormat ( ) const
Returns
A copy of the loaded format; a successful load must precede this query.
Ghidra address:
EAR: 0x100098d2

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