|Microsoft DirectX 9.0|
The IDirectMusicBuffer8 interface represents a buffer containing time-stamped data (typically in the form of MIDI messages) being sequenced to a port. The buffer contains a small amount of data, typically less than 200 milliseconds. Unless your application is doing its own sequencing, you do not need to use the methods of this interface.
IDirectMusicBuffer8 is a type definition for IDirectMusicBuffer. The two interface names are interchangeable.
Buffer objects are completely independent of port objects until the buffer is passed to the port by a call to the IDirectMusicPort8::PlayBuffer or the IDirectMusicPort8::Read method. The application is then free to reuse the buffer.
In addition to the methods inherited from IUnknown, the IDirectMusicBuffer8 interface exposes the following methods.
|Flush||Discards all data in the buffer.|
|GetBufferFormat||Retrieves the GUID that represents the buffer format.|
|GetMaxBytes||Retrieves the number of bytes that can be stored in the buffer.|
|GetNextEvent||Returns information about the next message in the buffer and advances the read pointer.|
|GetRawBufferPtr||Returns a pointer to the underlying buffer data structure.|
|GetStartTime||Retrieves the start time of the data in the buffer, relative to the master clock.|
|GetUsedBytes||Retrieves the number of bytes of data in the buffer.|
|PackStructured||Inserts fixed-length data (typically a MIDI channel message), along with timing and routing information, into the buffer.|
|PackUnstructured||Inserts unstructured data (typically a MIDI system-exclusive message), along with timing and routing information, into the buffer|
|ResetReadPtr||Sets the read pointer to the start of the data in the buffer.|
|SetStartTime||Sets the start time of the data in the buffer, relative to the master clock.|
|SetUsedBytes||Sets the number of bytes of data in the buffer.|
|TotalTime||Returns the total time spanned by the data in the buffer.|
The LPDIRECTMUSICBUFFER8 type is defined as a pointer to the IDirectMusicBuffer8 interface:
typedef IDirectMusicBuffer8 *LPDIRECTMUSICBUFFER8;
Header: Declared in dmusicc.h.