Interface Technology Basics VST 3.7
SDK for developing VST plug-in
IBStream Class Referenceabstract

Base class for streams. More...

#include <ibstream.h>

+ Inheritance diagram for IBStream:

Public Types

enum  IStreamSeekMode { kIBSeekSet = 0 , kIBSeekCur , kIBSeekEnd }
 

Public Member Functions

virtual tresult read (void *buffer, int32 numBytes, int32 *numBytesRead=nullptr)=0
 Reads binary data from stream. More...
 
virtual tresult write (void *buffer, int32 numBytes, int32 *numBytesWritten=nullptr)=0
 Writes binary data to stream. More...
 
virtual tresult seek (int64 pos, int32 mode, int64 *result=nullptr)=0
 Sets stream read-write position. More...
 
virtual tresult tell (int64 *pos)=0
 Gets current stream read-write position. More...
 
- Public Member Functions inherited from FUnknown
virtual tresult queryInterface (const TUID _iid, void **obj)=0
 Query for a pointer to the specified interface. More...
 
virtual uint32 addRef ()=0
 Adds a reference and returns the new reference count. More...
 
virtual uint32 release ()=0
 Releases a reference and returns the new reference count. More...
 

Static Public Attributes

static const FUID iid
 
- Static Public Attributes inherited from FUnknown
static const FUID iid
 

Detailed Description

Base class for streams.

  • read/write binary data from/to stream
  • get/set stream read-write position (read and write position is the same)

Member Enumeration Documentation

◆ IStreamSeekMode

Enumerator
kIBSeekSet 

set absolute seek position

kIBSeekCur 

set seek position relative to current position

kIBSeekEnd 

set seek position relative to stream end

Member Function Documentation

◆ read()

virtual tresult read ( void *  buffer,
int32  numBytes,
int32 numBytesRead = nullptr 
)
pure virtual

Reads binary data from stream.

Parameters
buffer: destination buffer
numBytes: amount of bytes to be read
numBytesRead: result - how many bytes have been read from stream (set to 0 if this is of no interest)

◆ write()

virtual tresult write ( void *  buffer,
int32  numBytes,
int32 numBytesWritten = nullptr 
)
pure virtual

Writes binary data to stream.

Parameters
buffer: source buffer
numBytes: amount of bytes to write
numBytesWritten: result - how many bytes have been written to stream (set to 0 if this is of no interest)

◆ seek()

virtual tresult seek ( int64  pos,
int32  mode,
int64 result = nullptr 
)
pure virtual

Sets stream read-write position.

Parameters
pos: new stream position (dependent on mode)
mode: value of enum IStreamSeekMode
result: new seek position (set to 0 if this is of no interest)

◆ tell()

virtual tresult tell ( int64 pos)
pure virtual

Gets current stream read-write position.

Parameters
pos: is assigned the current position if function succeeds

Member Data Documentation

◆ iid

const FUID iid
static
Empty

Copyright © Steinberg Media Technologies GmbH. All Rights Reserved. This documentation is under this license.