Platform SDK: DirectX

IDirectMusicBuffer

The IDirectMusicBuffer interface represents a buffer containing time-stamped data (typically in the form of MIDI messages) to be sequenced by a port. Unlike a segment, the buffer contains a small amount of data (typically less than 200 milliseconds) over which the application has control at event granularity.

Unless your application is doing its own sequencing, you do not need to use the methods of this interface.

Buffer objects are completely independent of port objects until the buffer is passed to the port by a call to the IDirectMusicPort::PlayBuffer or the IDirectMusicPort::Read method. The application is then free to reuse the buffer.

The methods of the IDirectMusicBuffer interface can be organized in the following groups:

Data Flush
  GetNextEvent
GetRawBufferPtr
PackStructured
PackUnstructured
ResetReadPtr
Parameters GetBufferFormat
  GetMaxBytes
GetUsedBytes
SetUsedBytes
Time GetStartTime
  SetStartTime
TotalTime

All COM interfaces inherit the IUnknown interface methods. This interface supports the following three methods:

IUnknown AddRef
  QueryInterface
Release

The LPDIRECTMUSICBUFFER type is defined as a pointer to the IDirectMusicBuffer interface:

typedef IDirectMusicBuffer *LPDIRECTMUSICBUFFER;

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Header: Declared in dmusicc.h.