IAudioclient_Initialize
, which returns an error as a HRESULT
which SDL passes to FormatMessage
to get the error message, It makes no sense at all that the message is emptySDL_OpenAudioDevice
fails, the error is ""
"WASAPI can't initialize audio client: "
TStaticRingBuffer
works xdCSnaphost
but idk if it acutally works xd// replay: add snapshot to ringbuffer
if(g_Config.m_ClRaceReplays)
{
//dbg_msg("replay", "snapsize: %d", SnapSize);
CSnapshot *pSnapshot = m_ReplayBuffer.Allocate(sizeof(CSnapshot) + SnapSize);
mem_copy(pSnapshot, aExtraInfoRemoved, SnapSize);
}
(edited)CSnapshot *pEntry = m_ReplayBuffer.First();
dbg_msg("replay", "number of snapshots in buffer: %d", m_ReplayBuffer.Allocations());
ReplayRecorder.RecordSnapshot(0, pEntry, pEntry->GetDataSize());
for(int i = 1; i < m_ReplayBuffer.Allocations(); i++)
{
pEntry = m_ReplayBuffer.Next(pEntry);
ReplayRecorder.RecordSnapshot(i, pEntry, pEntry->GetDataSize());
}
for(void *pEnt = buffer->First(); pEnt != buffer->Last(); pEnt = buffer->Next(pEnt))
CSnapshotStorage
looks interestingGetInterval
function to return all the snapshots between two given ticks