From 9c2d1766ea33101b551ac521ddc39516b98b6641 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Wed, 23 Oct 2019 09:28:58 -0400 Subject: Expose more repro in API, support output params. (#1087) * Added spEnableReproCapture to the API. * Added MemoryStreamBase - which can be used to read from without copyin the data. Added the missing Repro API functions - spEnableReproCapture and spExtractRepro. Added support for serializing output filenames. * Improved naming around Stream. Brought Stream and sub types closer to code conventions. * Renamed content -> contents in Stream. --- source/core/slang-riff.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source/core/slang-riff.cpp') diff --git a/source/core/slang-riff.cpp b/source/core/slang-riff.cpp index df2076013..ce8b7129b 100644 --- a/source/core/slang-riff.cpp +++ b/source/core/slang-riff.cpp @@ -20,7 +20,7 @@ namespace Slang } // Skip the payload (we don't need to skip the Chunk because that was already read - stream->Seek(SeekOrigin::Current, chunkSize - sizeof(RiffChunk)); + stream->seek(SeekOrigin::Current, chunkSize - sizeof(RiffChunk)); return SLANG_OK; } @@ -29,7 +29,7 @@ namespace Slang { try { - stream->Read(&outChunk, sizeof(RiffChunk)); + stream->read(&outChunk, sizeof(RiffChunk)); } catch (IOException&) { @@ -53,13 +53,13 @@ namespace Slang try { - out->Write(&chunk, sizeof(chunk)); - out->Write(data, size); + out->write(&chunk, sizeof(chunk)); + out->write(data, size); size_t remaining = size & 3; if (remaining) { uint8_t end[4] = { 0, 0, 0, 0}; - out->Write(end, 4 - remaining); + out->write(end, 4 - remaining); } } catch (IOException&) @@ -79,13 +79,13 @@ namespace Slang try { - stream->Read(data.getBuffer(), outChunk.m_size); + stream->read(data.getBuffer(), outChunk.m_size); // Skip to the alignment uint32_t remaining = outChunk.m_size & 3; if (remaining) { - stream->Seek(SeekOrigin::Current, 4 - remaining); + stream->seek(SeekOrigin::Current, 4 - remaining); } } catch (IOException&) -- cgit v1.2.3