Compartilhar via


WAVEFORMAT_MIDI

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This structure describes the waveform audio format for MIDI data.

Syntax

typedef struct _WAVEFORMAT_MIDI {
  WAVEFORMATEX wfx;
  UINT32 USecPerQuarterNote;
  UINT32 TicksPerQuarterNote;
} WAVEFORMAT_MIDI, *LPWAVEFORMAT_MIDI;

Members

  • wfx
    A standard WAVEFORMATEX (Waveform Audio) structure that most wave formats use. Within this structure, to allow MIDI playback, you must specify the values described in the following table.

    Value Description

    wFormatTag

    WAVE_FORMAT_MIDI

    nBlockAlign

    sizeof(WAVEFORMAT_MIDI_MESSAGE)

    cbSize

    WAVEFORMAT_MIDI_EXTRASIZE

  • USecPerQuarterNote
    Microseconds per quarter note of a MIDI file. This parameter helps set the tempo of a MIDI file during playback and works in conjunction with TicksPerQuarterNote to determine how fast a MIDI file plays. If set to 0, the member assumes a value of 500,000 milliseconds (or ½ second per quarter note).
  • TicksPerQuarterNote
    Ticks per quarter note of a MIDI file. This parameter helps set the tempo of a MIDI file during playback and works in conjunction with USecPerQuarterNote to determine how fast a MIDI file plays. If set to 0, the member assumes a value of 96 ticks per quarter note.

Requirements

Header wfmtmidi.h
Windows Embedded CE Windows Embedded CE 6.0 and later
Windows Mobile Pocket PC 2002 and later, Smartphone 2002 and later

See Also

Reference

Waveform Audio Structures
WAVEFORMATEX (Waveform Audio)
waveOutOpen

Concepts

MIDI