IDirectMusicBuffer::PackStructured
This method inserts fixed-length data (typically a MIDI channel message), along with timing and routing information, into the buffer.
HRESULT PackStructured(
REFERENCE_TIME rt,
DWORD dwChannelGroup,
DWORD dwChannelMessage
);
Parameters
- rt
Absolute time of the message. See Remarks. - dwChannelGroup
Channel group to which the data belongs. - dwChannelMessage
Data (MIDI message) to pack.
Return Values
If the method succeeds, the return value is S_OK.
If it fails, the method can return one of the following error values:
| DMUS_E_INVALID_EVENT |
| E_OUTOFMEMORY |
Remarks
At least 32 bytes (the size of DMUS_EVENTHEADER plus dwChannelMessage) must be free in the buffer.
The rt parameter must contain the absolute time at which the data is to be sent to the port. To play a message immediately, retrieve the time from the latency clock, and use this as rt. For more information, see IDirectMusicPort::GetLatencyClock.
Messages stamped with the same time do not necessarily play in the same order in which they were placed in the buffer.
Requirements
OS Versions: Windows CE .NET 4.0 and Windows CE .NET 4.1.
Header: Dmusicc.h.
Link Library: Dmusic.lib.
See Also
IDirectMusicBuffer::PackUnstructured | IDirectMusicPort::GetLatencyClock | DMUS_EVENTHEADER
Last updated on Monday, April 12, 2004
© 1992-2002 Microsoft Corporation. All rights reserved.