Device buffer reference and cached byte cursors for Windows DirectSound or the SDL mixer.
More...
#include <directsoundstate.h>
|
| void | Initialize () |
| | Reset the buffer pointer and both cached byte cursors without releasing prior resources.
|
| Buffer * | GetBuffer () const |
| void | ClearBuffer () |
| | Clear the buffer reference without stopping or releasing the buffer.
|
| DWORD | GetPlayCursor () const |
| void | SetPlayCursor (DWORD cursor) |
| | Replace the cached cursor without seeking the device.
|
| HRESULT | CreateBuffer (IDirectSound *device, _DSBUFFERDESC *description) |
| | Create a Windows buffer and store the returned reference without releasing a prior buffer.
|
| void | UpdateCursors () |
| | Query both cached byte cursors from a non-null device buffer.
|
Device buffer reference and cached byte cursors for Windows DirectSound or the SDL mixer.
Buffer release is explicit; resetting or replacing the reference does not release a buffer.
◆ Buffer
Windows device buffer type.
◆ Initialize()
| void EarDirectSoundPlaybackState::Initialize |
( |
| ) |
|
Reset the buffer pointer and both cached byte cursors without releasing prior resources.
- Ghidra address:
- EAR: 0x10012e50
◆ GetBuffer()
| Buffer * EarDirectSoundPlaybackState::GetBuffer |
( |
| ) |
const |
|
inline |
- Returns
- The borrowed device buffer, or null; releasing the buffer invalidates pointers.
◆ ClearBuffer()
| void EarDirectSoundPlaybackState::ClearBuffer |
( |
| ) |
|
|
inline |
Clear the buffer reference without stopping or releasing the buffer.
◆ GetPlayCursor()
| DWORD EarDirectSoundPlaybackState::GetPlayCursor |
( |
| ) |
const |
|
inline |
- Returns
- The cached playback position in buffer bytes, without querying the device.
◆ SetPlayCursor()
| void EarDirectSoundPlaybackState::SetPlayCursor |
( |
DWORD | cursor | ) |
|
|
inline |
Replace the cached cursor without seeking the device.
- Parameters
-
| cursor | The byte offset to store without validation. |
◆ CreateBuffer()
| HRESULT EarDirectSoundPlaybackState::CreateBuffer |
( |
IDirectSound * | device, |
|
|
_DSBUFFERDESC * | description ) |
Create a Windows buffer and store the returned reference without releasing a prior buffer.
- Parameters
-
| device | The non-null borrowed DirectSound device. |
| description | The non-null DirectSound buffer descriptor. |
- Returns
- The HRESULT from CreateSoundBuffer(), with DS_OK indicating success.
◆ UpdateCursors()
| void EarDirectSoundPlaybackState::UpdateCursors |
( |
| ) |
|
Query both cached byte cursors from a non-null device buffer.
SDL uses the playback cursor for both positions. Windows query results are copied back without checking the result code; output arguments initially have the cached values.
The documentation for this class was generated from the following file: