API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

ISOURCE_READ()

Brew Release
Brew MP 1.0.2
See Also
None
Description

This method copies bytes from the source stream to the specified buffer. All copied bytes are consumed (that is, the read pointer is advanced).
Params
pif
[]:
Pointer to the ISource Interface object.
pBuf
[]:
Pointer to the buffer to receive bytes read
nBufLen
[]:
Size of pc, in bytes.
Interface
Prototype
  •    int32 ISource_Read(
          ISource *   pif, 
          char *      pBuf, 
          int32       nBufLen
       );
    
Return

  • Number of bytes read, if successful. This will be a value greater than zero.
    Error code, if otherwise. Possible error code include:
    ISOURCE_END:end of stream (no more data).
    ISOURCE_ERROR: error was encountered (no more data).
    ISOURCE_WAIT: no data available at the moment; call Readable() to wait.
Comments
Note that the IWOURCE_WAIT return value is used instead of an error return value and an EWOULDBLOCK error code.