Microsoft DirectX 8.1 (C++) |
The IDirectMusicBuffer8 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.
IDirectMusicBuffer8 is a type definition for IDirectMusicBuffer. The two interface names are interchangeable.
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 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.
Method | Description |
Flush | Discards all data 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. |
PackStructured | Inserts fixed-length data along with timing and routing information, into the buffer. |
PackUnstructured | Inserts unstructured data along with timing and routing information, into the buffer. |
ResetReadPtr | Sets the read pointer to the start of the data in the buffer. |
Method | Description |
GetBufferFormat | Retrieves the GUID that represents the buffer format. |
GetMaxBytes | Retrieves the number of bytes that can be stored in the buffer. |
GetUsedBytes | Retrieves the number of bytes of data in the buffer. |
SetUsedBytes | Sets the number of bytes of data in the buffer. |
Method | Description |
GetStartTime | Retrieves the start time of the data in the buffer, relative to the master clock. |
SetStartTime | Sets the start time of the data in the buffer, relative to the master clock. |
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;
Requirements
Header: Declared in dmusicc.h.