PCM wave playback with optional half-buffer streaming and explicit resource release.
More...
|
| | PcmWaveStream () |
| | Initialise null file and sample references with zero read and write counters.
|
| | ~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 | 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 | 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 | ApplyPreset (EarWaveSample *preset) |
| | Apply implementation-specific preset data; the base implementation ignores the request.
|
| 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.
|
|
| EarWaveFile | file |
| DWORD | readOffset |
| LONG | dataStartOffset |
| LONG | originalFileOffset |
| char * | sampleBuffer |
| DWORD | dataBytes |
| EarWaveFormat | format |
| DWORD | writeOffset |
| 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.
|
PCM wave playback with optional half-buffer streaming and explicit resource release.
File-backed instances allocate sample storage; memory and preset subclasses borrow samples.
Create and fill the device buffer, apply initial frequency, and seek when requested.
Sample storage, format, buffer sizes, and base frequency must already be prepared.
- Returns
- The next 16-bit event identifier on success, wrapping without skipping zero; zero also indicates a device-buffer, copy, or seek failure.
- Ghidra address:
- EAR: 0x10012ba7
Reimplemented from EarPlayback.