5 #include <pluginterfaces/base/ibstream.h>
16 s.setByteOrder(QDataStream::LittleEndian);
18 Steinberg::tresult queryInterface(
const Steinberg::TUID _iid,
void** obj)
override
20 return Steinberg::kResultFalse;
22 Steinberg::uint32 addRef()
override {
return 1; }
23 Steinberg::uint32 release()
override {
return 1; }
26 read(
void* buffer, Steinberg::int32 numBytes, Steinberg::int32* numBytesRead)
override
28 int count = stream.readRawData((
char*)buffer, numBytes);
30 *numBytesRead = count;
31 return Steinberg::kResultTrue;
34 Steinberg::tresult write(
35 void* buffer, Steinberg::int32 numBytes,
36 Steinberg::int32* numBytesWritten)
override
38 int count = stream.writeRawData((
char*)buffer, numBytes);
40 *numBytesWritten = count;
42 return Steinberg::kResultTrue;
45 seek(Steinberg::int64 pos, Steinberg::int32 mode, Steinberg::int64* result)
override
47 bool ok = stream.device()->seek(pos);
49 *result = stream.device()->pos();
51 return ok ? Steinberg::kResultTrue : Steinberg::kResultFalse;
53 Steinberg::tresult tell(Steinberg::int64* pos)
override
56 *pos = stream.device()->pos();
58 return Steinberg::kResultTrue;
Definition: DataStream.hpp:10