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

Common event playback state with overridable media, device, and stream operations. More...

#include <earplayback.h>

Inheritance diagram for EarPlayback:
Collaboration diagram for EarPlayback:

Public Member Functions

 ~EarPlayback ()
 Invoke the base finalisation hook without releasing playback resources or derived storage.
void SetEarPlaybackFlags (std::uint16_t flags)
 Store source flags without validation or reinitialisation.
int GetStatus ()
int IsActive ()
void MarkComplete ()
 Request completion for the next completion check without stopping the device immediately.
int GetEarPlaybackMute ()
int IsEarPlaybackStreaming ()
int ResetPlaybackCompletion ()
 Withdraw a request to complete the playback.
void ClearPlaybackCompletion ()
 Withdraw a request to complete the playback.
virtual void ReleaseEarPlaybackResources ()
 Release registered playback through the virtual closure hook.
virtual void SetEarPlaybackDirectionalMatrix (std::uint16_t direction, std::uint16_t matrix)
 Store directional matrix identifiers without resolving an entry or updating output.
virtual void SetEarPlaybackDirectionalGain (std::uint16_t direction, double gain, std::uint16_t matrix)
 Update cached directional gain for registered playback and restart active smoothing.
virtual void ProcessEarPlaybackSmoothing ()
 Apply a frequency, gain, and pan smoothing pass to the current device buffer.
virtual void SetPlaybackSuppressionParameters (std::uint32_t enabled, std::uint16_t marker)
 Store suppression controls without starting or stopping playback.
virtual void SetEarPlaybackStartPosition (double position)
 Store an ordered nonzero start position and mark it specified; zero and NaN are ignored.
virtual void SetEarPlaybackStartMilliseconds (std::uint16_t milliseconds)
 Store an absolute start offset for wave-stream preparation.
virtual void SetReservedPlaybackEventControl (std::uint32_t control)
 Store a backend-specific event control value without applying it immediately.
virtual int InitializeEarPlayback (const void *source, int streaming, int looping)
 Initialise implementation-specific media; the base implementation does not change state.
virtual int StartEarPlayback ()
 Post an enabled start notification, attempt device playback, and mark successful starts active.
virtual int PauseEarPlayback ()
 Mark playback paused and attempt to stop the device buffer without clearing active state.
virtual int ResumeEarPlayback ()
 Attempt a restart when paused and active, then clear paused status.
virtual void CompleteEarPlayback ()
 Perform implementation-specific completion; the base implementation does not change state.
virtual void ApplyPreset (EarWaveSample *preset)
 Apply implementation-specific preset data; the base implementation ignores the request.
virtual std::uint32_t GetEarPlaybackMediaLength ()
virtual void SetEarPlaybackMute (int muted)
 Store mute state and refresh cached directional gain without stopping playback or timers.
virtual void SetBackendPlaybackOverrideEnabled (int enabled)
 Store the implementation-specific playback override marker.
virtual void SetEarPlaybackFrequencyScale (double scale)
 Clamp an ordered changed scale to 0..6.5535 and recalculate frequency from the base rate.
virtual void SetEarPlaybackBaseFrequencyScale (double scale)
 Store the initial frequency multiplier without validation or device updates.
virtual void SetCachedBackendPlaybackParameter (double value)
 Store an ordered changed backend parameter and invoke the parameter-change hook.
virtual int IsBufferedEarPlaybackComplete ()
 Check requested completion or active device state and refill a stream half when necessary.
virtual void SetEarPlaybackLooping (int enabled)
 Store looping state without changing the currently playing buffer's device flags.
virtual void SetEarPlaybackNotification (std::uint32_t flags, std::uint16_t event)
 Store notification controls for later playback transitions.

Protected Member Functions

virtual void CloseRegisteredEarPlayback ()
 Stop and release a registered buffer, post an enabled closure notification, and unregister playback.
virtual void OnPlaybackWaveSampleAttached (EarWaveSample *sample)
 Respond to sample attachment; the base implementation ignores the notification.
virtual int IsDirectSoundBufferStopped ()
 Query the device buffer; a non-null buffer is required.
 EarPlayback ()
 Initialise inactive playback and smoothing defaults without allocating media or a buffer.
void SetPlaybackBufferBytes (std::uint32_t bytes)
 Store buffer capacity without reallocating storage.
void SetStreamHalfBytes (std::uint32_t bytes)
 Store the refill-half capacity without changing the buffer.
void DisablePlaybackStreaming ()
 Clear the streaming marker without changing device looping flags.
std::uint16_t GetPlaybackStartMilliseconds () const
bool HasPlaybackStartPosition () const
void SpecifyPlaybackStartPosition ()
 Mark the stored start position specified without changing its value.
void SetPlaybackStreamingAndLooping (int isStreaming, int isLooping)
 Store stream and loop markers without validation or device changes.
double GetPlaybackBaseFrequencyScale () const
void SetPlaybackBaseFrequency (std::uint32_t value)
 Store base frequency without updating the current device frequency.
void SetPlaybackHandle (std::uint32_t handle)
 Store a registration handle without modifying the playback registry.
std::uint32_t GetPlaybackHandle () const
HRESULT CreateDirectSoundPlaybackBuffer (IDirectSound *device, _DSBUFFERDESC *description)
 Create a Windows device buffer; an existing buffer must be released before replacement.
void ResetPlaybackBufferFrequency ()
 Reset current frequency to the initialised base frequency without updating the device.
std::uint32_t GetPlaybackBufferBytes () const
bool HasNonStreamingStartPosition () const
double GetPlaybackStartPosition () const
void ClearPlaybackStartPosition ()
 Clear the specified marker and reset the start position to zero.
EarDirectSoundPlaybackState::Buffer * GetDirectSoundBuffer () const
std::uint32_t IncrementLoopDrainCount ()
void EndStreamingPlaybackLoop ()
 Clear both loop and stream markers without stopping the device immediately.
std::uint16_t GetPlaybackSourceFlags () const
bool IsPlaybackLooping () const
bool HasPlaybackHandle () const
void DisablePlaybackLooping ()
 Clear the looping marker without changing device playback flags.
std::uint32_t GetStreamHalfIndex () const
std::uint32_t GetStreamHalfBytes () const
void FlipStreamHalfIndex ()
 Toggle the refill-half index between zero and one.

Protected Attributes

std::uint32_t playbackHandle
 Playback registry key, or zero when unregistered.
std::uint32_t reservedEventControl
 Implementation-specific event control, including in-memory MIDI source length in bytes.
std::uint32_t notificationFlags
 Notification bits for starts (1) and registered closures (2).
std::uint16_t notificationEvent
 Event identifier included in window notifications.
std::uint16_t flags
 Source flags interpreted by derived media implementations; base construction omits them.
int looping
 Nonzero while looping is requested.
int streaming
 Nonzero while media requires half-buffer refills.
int completionRequested
 Nonzero after completion is requested or detected.
std::uint32_t streamHalfIndex
 Next streaming half to refill, initially one.
int active
 Nonzero after successful playback starts, including during a pause.
int muted
 Nonzero when muted; cached gain remains available for unmuting.
int status
 Pause status, zero when unpaused.
int backendOverrideEnabled
 Nonzero when implementation-specific position or frequency overrides are enabled.
std::uint32_t suppressionEnabled
 Nonzero when spatial suppression processing is enabled.
int startPositionSpecified
 Nonzero when startPosition is specified rather than merely stored.
std::uint16_t suppressionMarker
 Suppression role, with one suppressing base device starts.
std::uint16_t startMilliseconds
 Wave-stream initial offset in milliseconds, or zero when disabled.
std::uint16_t matrixId
 Selected directional matrix handle, initially 16.
std::uint16_t directionIndex
 Selected directional row index, normally 0..127.
double previousGain
 Linear gain at the start of the current smoothing transition.
double targetGain
 Target linear gain before directional and master attenuation.
EarDirectionalMatrixEntry previousMatrixEntry
 Directional pan and gain at the start of the current smoothing transition.
EarDirectionalMatrixEntry targetMatrixEntry
 Target directional pan and gain resolved from the selected matrix.
std::uint32_t frequency
 Target sample frequency in hertz before device range clamping.
std::uint32_t previousFrequency
 Sample frequency in hertz at the start of the smoothing transition.
std::uint8_t unknown6c [2]
 Unrecovered bytes retained at the original object offset.
std::uint16_t smoothingPass
 Smoothing pass index; zero selects the target directly.
std::uint32_t bufferBytes
 Decoded device sample-buffer capacity in bytes.
std::uint32_t streamHalfBytes
 Decoded byte count in each streaming half.
double startPosition
 Implementation-specific start position, usually a fraction of media length.
double frequencyScale
 Current dimensionless playback frequency multiplier.
double baseFrequencyScale
 Initial frequency multiplier applied while preparing media.
std::uint32_t baseFrequency
 Initial sample frequency in hertz; derived initialisation must assign it.
double cachedBackendParameter
 Cached implementation-specific parameter, initially -1.
std::uint32_t loopDrainCount
 Number of post-data streaming refills used while draining non-looping playback.
EarDirectSoundPlaybackState directSound
 Device buffer reference and cached byte cursors; resource release is explicit.

Detailed Description

Common event playback state with overridable media, device, and stream operations.

ReleaseEarPlaybackResources() must run before destruction to release device resources. The destructor is non-virtual and does not release registered playback by itself.

Constructor & Destructor Documentation

◆ ~EarPlayback()

EarPlayback::~EarPlayback ( )

Invoke the base finalisation hook without releasing playback resources or derived storage.

Ghidra address:
EAR: 0x1000a84e

◆ EarPlayback()

EarPlayback::EarPlayback ( )
protected

Initialise inactive playback and smoothing defaults without allocating media or a buffer.

Derived initialisation must set source flags and base frequency before reading them.

Ghidra address:
EAR: 0x1000a6a0

Member Function Documentation

◆ SetEarPlaybackFlags()

void EarPlayback::SetEarPlaybackFlags ( std::uint16_t flags)

Store source flags without validation or reinitialisation.

Parameters
flagsThe source and resource-management flag bits for the media implementation.
Ghidra address:
EAR: 0x10008aa0

◆ GetStatus()

int EarPlayback::GetStatus ( )
Returns
The stored pause status, with zero for unpaused playback and nonzero for paused.
Ghidra address:
EAR: 0x1000ab77

◆ IsActive()

int EarPlayback::IsActive ( )
Returns
The stored active marker; pausing does not clear the marker.
Ghidra address:
EAR: 0x1000ad34

◆ MarkComplete()

void EarPlayback::MarkComplete ( )

Request completion for the next completion check without stopping the device immediately.

Ghidra address:
EAR: 0x1000ad45

◆ GetEarPlaybackMute()

int EarPlayback::GetEarPlaybackMute ( )
Returns
The stored mute marker, with nonzero indicating mute.
Ghidra address:
EAR: 0x1000ab88

◆ IsEarPlaybackStreaming()

int EarPlayback::IsEarPlaybackStreaming ( )
Returns
The stored streaming marker, with nonzero indicating buffered streaming.
Ghidra address:
EAR: 0x1000ab99

◆ ResetPlaybackCompletion()

int EarPlayback::ResetPlaybackCompletion ( )

Withdraw a request to complete the playback.

Returns
One, including when completion was not requested.
Ghidra address:
EAR: 0x10012530

◆ ClearPlaybackCompletion()

void EarPlayback::ClearPlaybackCompletion ( )

Withdraw a request to complete the playback.

Ghidra address:
EAR: 0x1001254a

◆ ReleaseEarPlaybackResources()

virtual void EarPlayback::ReleaseEarPlaybackResources ( )
virtual

Release registered playback through the virtual closure hook.

Derived implementations also release their media storage here.

Ghidra address:
EAR: 0x1000a86a

Reimplemented in CdAudioPlayback, and MidiPlayback.

◆ SetEarPlaybackDirectionalMatrix()

virtual void EarPlayback::SetEarPlaybackDirectionalMatrix ( std::uint16_t direction,
std::uint16_t matrix )
virtual

Store directional matrix identifiers without resolving an entry or updating output.

Parameters
directionThe directional row index, normally 0..127.
matrixThe built-in or registered matrix handle.
Ghidra address:
EAR: 0x10003a40

◆ SetEarPlaybackDirectionalGain()

virtual void EarPlayback::SetEarPlaybackDirectionalGain ( std::uint16_t direction,
double gain,
std::uint16_t matrix )
virtual

Update cached directional gain for registered playback and restart active smoothing.

Output changes during ProcessEarPlaybackSmoothing(). Muted playback preserves cached gain. Unregistered playback ignores the request. Negative gain is not clamped; NaN can be stored when the direction or matrix changes but otherwise does not trigger an update.

Parameters
directionThe directional row index, normally 0..127.
gainThe linear gain; values above one request the previously cached gain.
matrixThe built-in or registered matrix handle.
Ghidra address:
EAR: 0x1000aa26

Reimplemented in CdAudioPlayback, and MidiPlayback.

◆ ProcessEarPlaybackSmoothing()

virtual void EarPlayback::ProcessEarPlaybackSmoothing ( )
virtual

Apply a frequency, gain, and pan smoothing pass to the current device buffer.

Inactive playback resets the pass counter. Global smoothing settings determine progression.

Ghidra address:
EAR: 0x1000ae0f

◆ SetPlaybackSuppressionParameters()

virtual void EarPlayback::SetPlaybackSuppressionParameters ( std::uint32_t enabled,
std::uint16_t marker )
virtual

Store suppression controls without starting or stopping playback.

Parameters
enabledThe suppression-enable marker, with zero disabling suppression.
markerThe suppression role; one suppresses base device starts when enabled.
Ghidra address:
EAR: 0x10003a70

◆ SetEarPlaybackStartPosition()

virtual void EarPlayback::SetEarPlaybackStartPosition ( double position)
virtual

Store an ordered nonzero start position and mark it specified; zero and NaN are ignored.

Parameters
positionThe backend-specific position, usually a fraction of media length.
Ghidra address:
EAR: 0x1000ad81

◆ SetEarPlaybackStartMilliseconds()

virtual void EarPlayback::SetEarPlaybackStartMilliseconds ( std::uint16_t milliseconds)
virtual

Store an absolute start offset for wave-stream preparation.

Parameters
millisecondsThe start offset in milliseconds; zero disables the offset.
Ghidra address:
EAR: 0x10003aa0

◆ SetReservedPlaybackEventControl()

virtual void EarPlayback::SetReservedPlaybackEventControl ( std::uint32_t control)
virtual

Store a backend-specific event control value without applying it immediately.

Parameters
controlThe control value, used as a byte count for an in-memory MIDI source.
Ghidra address:
EAR: 0x10003ac0

◆ InitializeEarPlayback()

virtual int EarPlayback::InitializeEarPlayback ( const void * source,
int streaming,
int looping )
virtual

Initialise implementation-specific media; the base implementation does not change state.

Parameters
sourceThe implementation-specific source representation, unused by the base.
streamingThe requested streaming marker, unused by the base.
loopingThe requested looping marker, unused by the base.
Returns
One in the base implementation; derived implementations return zero on failure.
Ghidra address:
EAR: 0x1000aa14

Reimplemented in CdAudioPlayback, and MidiPlayback.

◆ StartEarPlayback()

virtual int EarPlayback::StartEarPlayback ( )
virtual

Post an enabled start notification, attempt device playback, and mark successful starts active.

Enabled suppression with role one reports success without starting the base device buffer.

Returns
One on success; zero on a missing buffer or device error, with an EAR error recorded.
Ghidra address:
EAR: 0x1000a9bf

Reimplemented in CdAudioPlayback, and MidiPlayback.

◆ PauseEarPlayback()

virtual int EarPlayback::PauseEarPlayback ( )
virtual

Mark playback paused and attempt to stop the device buffer without clearing active state.

Returns
One on success; zero when the buffer is missing or a device stop fails.
Ghidra address:
EAR: 0x1000a99f

Reimplemented in CdAudioPlayback, and MidiPlayback.

◆ ResumeEarPlayback()

virtual int EarPlayback::ResumeEarPlayback ( )
virtual

Attempt a restart when paused and active, then clear paused status.

Returns
One, including when a restart fails or playback was not paused.
Ghidra address:
EAR: 0x1000add8

Reimplemented in CdAudioPlayback, and MidiPlayback.

◆ CloseRegisteredEarPlayback()

virtual void EarPlayback::CloseRegisteredEarPlayback ( )
protectedvirtual

Stop and release a registered buffer, post an enabled closure notification, and unregister playback.

An absent playback handle suppresses all closure work.

Ghidra address:
EAR: 0x1000a88b

Reimplemented in CdAudioPlayback, MidiPlayback, and PcmWaveStream.

◆ CompleteEarPlayback()

virtual void EarPlayback::CompleteEarPlayback ( )
virtual

Perform implementation-specific completion; the base implementation does not change state.

Ghidra address:
EAR: 0x1000a8e5

◆ ApplyPreset()

virtual void EarPlayback::ApplyPreset ( EarWaveSample * preset)
virtual

Apply implementation-specific preset data; the base implementation ignores the request.

Parameters
presetThe preset, unused.
Ghidra address:
EAR: 0x10006710

◆ OnPlaybackWaveSampleAttached()

virtual void EarPlayback::OnPlaybackWaveSampleAttached ( EarWaveSample * sample)
protectedvirtual

Respond to sample attachment; the base implementation ignores the notification.

Parameters
sampleThe borrowed sample pointer, unused by the base.
Ghidra address:
EAR: 0x100129bc

◆ GetEarPlaybackMediaLength()

virtual std::uint32_t EarPlayback::GetEarPlaybackMediaLength ( )
virtual
Returns
Zero in the base implementation; media length in backend-specific units otherwise.
Ghidra address:
EAR: 0x100094e0

Reimplemented in CdAudioPlayback.

◆ SetEarPlaybackMute()

virtual void EarPlayback::SetEarPlaybackMute ( int muted)
virtual

Store mute state and refresh cached directional gain without stopping playback or timers.

Parameters
mutedThe mute marker, with nonzero indicating mute.
Ghidra address:
EAR: 0x1000ab3f

Reimplemented in CdAudioPlayback, and MidiPlayback.

◆ SetBackendPlaybackOverrideEnabled()

virtual void EarPlayback::SetBackendPlaybackOverrideEnabled ( int enabled)
virtual

Store the implementation-specific playback override marker.

Parameters
enabledThe override marker, with nonzero indicating enabled.
Ghidra address:
EAR: 0x1000abaa

◆ SetEarPlaybackFrequencyScale()

virtual void EarPlayback::SetEarPlaybackFrequencyScale ( double scale)
virtual

Clamp an ordered changed scale to 0..6.5535 and recalculate frequency from the base rate.

Unordered comparisons preserve the existing value. Output updates during smoothing.

Parameters
scaleThe dimensionless frequency multiplier; base frequency must be initialised.
Ghidra address:
EAR: 0x1000ac36

◆ SetEarPlaybackBaseFrequencyScale()

virtual void EarPlayback::SetEarPlaybackBaseFrequencyScale ( double scale)
virtual

Store the initial frequency multiplier without validation or device updates.

Parameters
scaleThe dimensionless multiplier applied during derived media initialisation.
Ghidra address:
EAR: 0x1000abd1

◆ SetCachedBackendPlaybackParameter()

virtual void EarPlayback::SetCachedBackendPlaybackParameter ( double value)
virtual

Store an ordered changed backend parameter and invoke the parameter-change hook.

Unordered comparisons preserve the existing value.

Parameters
valueThe implementation-specific parameter, without validation.
Ghidra address:
EAR: 0x1000abf3

◆ IsBufferedEarPlaybackComplete()

virtual int EarPlayback::IsBufferedEarPlaybackComplete ( )
virtual

Check requested completion or active device state and refill a stream half when necessary.

Non-streaming looping playback and inactive playback do not complete without a request.

Returns
Nonzero when completion is requested or an active non-looping buffer has stopped.
Ghidra address:
EAR: 0x1000a8f0

Reimplemented in CdAudioPlayback, and MidiPlayback.

◆ IsDirectSoundBufferStopped()

virtual int EarPlayback::IsDirectSoundBufferStopped ( )
protectedvirtual

Query the device buffer; a non-null buffer is required.

Returns
Nonzero when the buffer is not playing; otherwise zero.
Ghidra address:
EAR: 0x100126dd

◆ SetEarPlaybackLooping()

virtual void EarPlayback::SetEarPlaybackLooping ( int enabled)
virtual

Store looping state without changing the currently playing buffer's device flags.

Parameters
enabledThe looping marker, with nonzero indicating enabled.
Ghidra address:
EAR: 0x1000ad6b

◆ SetEarPlaybackNotification()

virtual void EarPlayback::SetEarPlaybackNotification ( std::uint32_t flags,
std::uint16_t event )
virtual

Store notification controls for later playback transitions.

Parameters
flagsBit zero enables start messages; bit one enables registered-closure messages.
eventThe event identifier included in notification messages.
Ghidra address:
EAR: 0x1000adb7

◆ SetPlaybackBufferBytes()

void EarPlayback::SetPlaybackBufferBytes ( std::uint32_t bytes)
inlineprotected

Store buffer capacity without reallocating storage.

Parameters
bytesThe total decoded sample-buffer capacity in bytes.

◆ SetStreamHalfBytes()

void EarPlayback::SetStreamHalfBytes ( std::uint32_t bytes)
inlineprotected

Store the refill-half capacity without changing the buffer.

Parameters
bytesThe decoded byte count in each streaming half.

◆ DisablePlaybackStreaming()

void EarPlayback::DisablePlaybackStreaming ( )
inlineprotected

Clear the streaming marker without changing device looping flags.

◆ GetPlaybackStartMilliseconds()

std::uint16_t EarPlayback::GetPlaybackStartMilliseconds ( ) const
inlineprotected
Returns
The stored wave-stream start offset in milliseconds, or zero when disabled.

◆ HasPlaybackStartPosition()

bool EarPlayback::HasPlaybackStartPosition ( ) const
inlineprotected
Returns
Whether a backend-specific start position is specified.

◆ SpecifyPlaybackStartPosition()

void EarPlayback::SpecifyPlaybackStartPosition ( )
inlineprotected

Mark the stored start position specified without changing its value.

◆ SetPlaybackStreamingAndLooping()

void EarPlayback::SetPlaybackStreamingAndLooping ( int isStreaming,
int isLooping )
inlineprotected

Store stream and loop markers without validation or device changes.

Parameters
isStreamingThe streaming marker, with nonzero indicating enabled.
isLoopingThe looping marker, with nonzero indicating enabled.

◆ GetPlaybackBaseFrequencyScale()

double EarPlayback::GetPlaybackBaseFrequencyScale ( ) const
inlineprotected
Returns
The dimensionless initial frequency multiplier.

◆ SetPlaybackBaseFrequency()

void EarPlayback::SetPlaybackBaseFrequency ( std::uint32_t value)
inlineprotected

Store base frequency without updating the current device frequency.

Parameters
valueThe base sample rate in hertz.

◆ SetPlaybackHandle()

void EarPlayback::SetPlaybackHandle ( std::uint32_t handle)
inlineprotected

Store a registration handle without modifying the playback registry.

Parameters
handleThe playback handle, or zero for unregistered playback.

◆ GetPlaybackHandle()

std::uint32_t EarPlayback::GetPlaybackHandle ( ) const
inlineprotected
Returns
The stored playback handle, or zero for unregistered playback.

◆ CreateDirectSoundPlaybackBuffer()

HRESULT EarPlayback::CreateDirectSoundPlaybackBuffer ( IDirectSound * device,
_DSBUFFERDESC * description )
protected

Create a Windows device buffer; an existing buffer must be released before replacement.

Parameters
deviceThe non-null borrowed DirectSound device used for creation.
descriptionThe non-null buffer descriptor required by DirectSound.
Returns
The HRESULT from CreateSoundBuffer(); DS_OK indicates success.

◆ ResetPlaybackBufferFrequency()

void EarPlayback::ResetPlaybackBufferFrequency ( )
inlineprotected

Reset current frequency to the initialised base frequency without updating the device.

◆ GetPlaybackBufferBytes()

std::uint32_t EarPlayback::GetPlaybackBufferBytes ( ) const
inlineprotected
Returns
The stored decoded sample-buffer capacity in bytes.

◆ HasNonStreamingStartPosition()

bool EarPlayback::HasNonStreamingStartPosition ( ) const
inlineprotected
Returns
Whether a start position is specified and streaming is disabled.

◆ GetPlaybackStartPosition()

double EarPlayback::GetPlaybackStartPosition ( ) const
inlineprotected
Returns
The backend-specific start position, meaningful when marked specified.

◆ ClearPlaybackStartPosition()

void EarPlayback::ClearPlaybackStartPosition ( )
inlineprotected

Clear the specified marker and reset the start position to zero.

◆ GetDirectSoundBuffer()

EarDirectSoundPlaybackState::Buffer * EarPlayback::GetDirectSoundBuffer ( ) const
inlineprotected
Returns
The borrowed buffer, or null; releasing the buffer invalidates the pointer.

◆ IncrementLoopDrainCount()

std::uint32_t EarPlayback::IncrementLoopDrainCount ( )
inlineprotected
Returns
The incremented stream-drain counter, wrapping at 32 bits.

◆ EndStreamingPlaybackLoop()

void EarPlayback::EndStreamingPlaybackLoop ( )
inlineprotected

Clear both loop and stream markers without stopping the device immediately.

◆ GetPlaybackSourceFlags()

std::uint16_t EarPlayback::GetPlaybackSourceFlags ( ) const
inlineprotected
Returns
The stored source flags; derived construction must initialise the value first.

◆ IsPlaybackLooping()

bool EarPlayback::IsPlaybackLooping ( ) const
inlineprotected
Returns
Whether the stored looping marker is nonzero.

◆ HasPlaybackHandle()

bool EarPlayback::HasPlaybackHandle ( ) const
inlineprotected
Returns
Whether a nonzero playback handle is stored.

◆ DisablePlaybackLooping()

void EarPlayback::DisablePlaybackLooping ( )
inlineprotected

Clear the looping marker without changing device playback flags.

◆ GetStreamHalfIndex()

std::uint32_t EarPlayback::GetStreamHalfIndex ( ) const
inlineprotected
Returns
The next refill-half index, zero or one under normal streaming progression.

◆ GetStreamHalfBytes()

std::uint32_t EarPlayback::GetStreamHalfBytes ( ) const
inlineprotected
Returns
The stored decoded byte count in each streaming half.

◆ FlipStreamHalfIndex()

void EarPlayback::FlipStreamHalfIndex ( )
inlineprotected

Toggle the refill-half index between zero and one.

Member Data Documentation

◆ playbackHandle

std::uint32_t EarPlayback::playbackHandle
protected

Playback registry key, or zero when unregistered.

◆ reservedEventControl

std::uint32_t EarPlayback::reservedEventControl
protected

Implementation-specific event control, including in-memory MIDI source length in bytes.

◆ notificationFlags

std::uint32_t EarPlayback::notificationFlags
protected

Notification bits for starts (1) and registered closures (2).

◆ notificationEvent

std::uint16_t EarPlayback::notificationEvent
protected

Event identifier included in window notifications.

◆ flags

std::uint16_t EarPlayback::flags
protected

Source flags interpreted by derived media implementations; base construction omits them.

◆ looping

int EarPlayback::looping
protected

Nonzero while looping is requested.

◆ streaming

int EarPlayback::streaming
protected

Nonzero while media requires half-buffer refills.

◆ completionRequested

int EarPlayback::completionRequested
protected

Nonzero after completion is requested or detected.

◆ streamHalfIndex

std::uint32_t EarPlayback::streamHalfIndex
protected

Next streaming half to refill, initially one.

◆ active

int EarPlayback::active
protected

Nonzero after successful playback starts, including during a pause.

◆ muted

int EarPlayback::muted
protected

Nonzero when muted; cached gain remains available for unmuting.

◆ status

int EarPlayback::status
protected

Pause status, zero when unpaused.

◆ backendOverrideEnabled

int EarPlayback::backendOverrideEnabled
protected

Nonzero when implementation-specific position or frequency overrides are enabled.

◆ suppressionEnabled

std::uint32_t EarPlayback::suppressionEnabled
protected

Nonzero when spatial suppression processing is enabled.

◆ startPositionSpecified

int EarPlayback::startPositionSpecified
protected

Nonzero when startPosition is specified rather than merely stored.

◆ suppressionMarker

std::uint16_t EarPlayback::suppressionMarker
protected

Suppression role, with one suppressing base device starts.

◆ startMilliseconds

std::uint16_t EarPlayback::startMilliseconds
protected

Wave-stream initial offset in milliseconds, or zero when disabled.

◆ matrixId

std::uint16_t EarPlayback::matrixId
protected

Selected directional matrix handle, initially 16.

◆ directionIndex

std::uint16_t EarPlayback::directionIndex
protected

Selected directional row index, normally 0..127.

◆ previousGain

double EarPlayback::previousGain
protected

Linear gain at the start of the current smoothing transition.

◆ targetGain

double EarPlayback::targetGain
protected

Target linear gain before directional and master attenuation.

◆ previousMatrixEntry

EarDirectionalMatrixEntry EarPlayback::previousMatrixEntry
protected

Directional pan and gain at the start of the current smoothing transition.

◆ targetMatrixEntry

EarDirectionalMatrixEntry EarPlayback::targetMatrixEntry
protected

Target directional pan and gain resolved from the selected matrix.

◆ frequency

std::uint32_t EarPlayback::frequency
protected

Target sample frequency in hertz before device range clamping.

◆ previousFrequency

std::uint32_t EarPlayback::previousFrequency
protected

Sample frequency in hertz at the start of the smoothing transition.

◆ unknown6c

std::uint8_t EarPlayback::unknown6c[2]
protected

Unrecovered bytes retained at the original object offset.

◆ smoothingPass

std::uint16_t EarPlayback::smoothingPass
protected

Smoothing pass index; zero selects the target directly.

◆ bufferBytes

std::uint32_t EarPlayback::bufferBytes
protected

Decoded device sample-buffer capacity in bytes.

◆ streamHalfBytes

std::uint32_t EarPlayback::streamHalfBytes
protected

Decoded byte count in each streaming half.

◆ startPosition

double EarPlayback::startPosition
protected

Implementation-specific start position, usually a fraction of media length.

◆ frequencyScale

double EarPlayback::frequencyScale
protected

Current dimensionless playback frequency multiplier.

◆ baseFrequencyScale

double EarPlayback::baseFrequencyScale
protected

Initial frequency multiplier applied while preparing media.

◆ baseFrequency

std::uint32_t EarPlayback::baseFrequency
protected

Initial sample frequency in hertz; derived initialisation must assign it.

◆ cachedBackendParameter

double EarPlayback::cachedBackendParameter
protected

Cached implementation-specific parameter, initially -1.

◆ loopDrainCount

std::uint32_t EarPlayback::loopDrainCount
protected

Number of post-data streaming refills used while draining non-looping playback.

◆ directSound

EarDirectSoundPlaybackState EarPlayback::directSound
protected

Device buffer reference and cached byte cursors; resource release is explicit.


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