WinAPY Documentation




midiOutClose

Note that this documentation has been automatically generated. It may be flawed or incorrect.

View midiOutClose on Microsoft Docs

1
2
def midiOutClose(hwo: HMIDIOUT) -> int:
...

midiOutLongMsg

Note that this documentation has been automatically generated. It may be flawed or incorrect.

View midiOutLongMsg on Microsoft Docs

1
2
def midiOutLongMsg(hmo: HMIDIOUT, pytup: midihdr) -> int:
...

midiOutOpen

Note that this documentation has been automatically generated. It may be flawed or incorrect.

View midiOutOpen on Microsoft Docs

1
2
def midiOutOpen(device_id: int, dw_callback: int, dw_instance: int, dopen: int) -> HANDLE:
...

midiOutPrepareHeader

Note that this documentation has been automatically generated. It may be flawed or incorrect.

View midiOutPrepareHeader on Microsoft Docs

1
2
def midiOutPrepareHeader(h_out: HMIDIOUT, b_arr: bytearray, user: int, flags: int):
...

midiOutReset

Note that this documentation has been automatically generated. It may be flawed or incorrect.

View midiOutReset on Microsoft Docs

1
2
def midiOutReset(hmo: HMIDIOUT) -> int:
...

midiOutSetVolume

Note that this documentation has been automatically generated. It may be flawed or incorrect.

View midiOutSetVolume on Microsoft Docs

1
2
def midiOutSetVolume(hwo: HMIDIOUT, dw_lo: int, dw_hi: int) -> int:
...

midiOutShortMsg

Note that this documentation has been automatically generated. It may be flawed or incorrect.

View midiOutShortMsg on Microsoft Docs

1
2
def midiOutShortMsg(hwo: HMIDIOUT, dw_lo: int) -> int:
...

midiOutShortMsgFromBytes

Note that this documentation has been automatically generated. It may be flawed or incorrect.

View midiOutShortMsgFromBytes on Microsoft Docs

1
2
def midiOutShortMsgFromBytes(hmo: HMIDIOUT, first_byte: int, second_byte: int, third_byte: int) -> int:
...

midiOutUnprepareHeader

Note that this documentation has been automatically generated. It may be flawed or incorrect.

View midiOutUnprepareHeader on Microsoft Docs

1
2
def midiOutUnprepareHeader(hmo: HMIDIOUT, pytup: midihdr) -> int:
...

waveOutClose

1
2
def waveOutClose(hwo: HWAVEOUT) -> bool:
...

Description

Closes and frees memory from the specified waveform-audio output device.

Parameters

hwo HWAVEOUT
Handle to the waveform-audio output device.


waveOutGetDevCaps

Note that this documentation has been automatically generated. It may be flawed or incorrect.

View waveOutGetDevCaps on Microsoft Docs

1
2
def waveOutGetDevCaps(device_id: int):
...

waveOutGetID

Note that this documentation has been automatically generated. It may be flawed or incorrect.

View waveOutGetID on Microsoft Docs

1
2
def waveOutGetID(hwo: HWAVEOUT) -> int:
...

waveOutGetNumDevs

Note that this documentation has been automatically generated. It may be flawed or incorrect.

View waveOutGetNumDevs on Microsoft Docs

1
2
def waveOutGetNumDevs() -> int:
...

waveOutGetPitch

Note that this documentation has been automatically generated. It may be flawed or incorrect.

View waveOutGetPitch on Microsoft Docs

1
2
def waveOutGetPitch(hwo: HWAVEOUT) -> int:
...

waveOutGetPlaybackRate

Note that this documentation has been automatically generated. It may be flawed or incorrect.

View waveOutGetPlaybackRate on Microsoft Docs

1
2
def waveOutGetPlaybackRate(hwo: HWAVEOUT) -> int:
...

waveOutGetVolume

Note that this documentation has been automatically generated. It may be flawed or incorrect.

View waveOutGetVolume on Microsoft Docs

1
2
def waveOutGetVolume(hwo: HWAVEOUT) -> HH:
...

waveOutOpen

1
2
def waveOutOpen(deviceID: int, wfx: tuple, callback: int, instance: int, fOpen: int) -> HWAVEOUT:
...

Description

Opens the given waveform-audio output device for playback. The return value specifies a handle identifying the open waveform-audio output device.

Parameters

deviceID int
Identifier of the waveform-audio output device to open. It can be either a device identifier or a handle of an open waveform-audio input device. You can also use the following flag instead of a device identifier;
WAVE_MAPPER - The function selects a waveform-audio output device capable of playing the given format.

wfx tuple
A tuple of 6 integers representing the values below;
  • wFormatTag
    Waveform-audio format type. Format tags are registered with Microsoft Corporation for many compression algorithms. For one- or two-channel PCM data, this value should be WAVE_FORMAT_PCM.
  • nChannels
    Number of channels in the waveform-audio data. Monaural data uses one channel and stereo data uses two channels.
  • nSamplesPerSec
    Sample rate, in samples per second (hertz). If wFormatTag is WAVE_FORMAT_PCM, then common values for nSamplesPerSec are 8.0 kHz, 11.025 kHz, 22.05 kHz, and 44.1 kHz. For non-PCM formats, this member must be computed according to the manufacturer's specification of the format tag.
  • nAvgBytesPerSec
    Required average data-transfer rate, in bytes per second, for the format tag. If wFormatTag is WAVE_FORMAT_PCM, nAvgBytesPerSec should be equal to the product of nSamplesPerSec and nBlockAlign. For non-PCM formats, this member must be computed according to the manufacturer's specification of the format tag.
  • nBlockAlign
    Block alignment, in bytes. The block alignment is the minimum atomic unit of data for the wFormatTag format type. If wFormatTag is WAVE_FORMAT_PCM or WAVE_FORMAT_EXTENSIBLE, nBlockAlign must be equal to the product of nChannels and wBitsPerSample divided by 8 (bits per byte). For non-PCM formats, this member must be computed according to the manufacturer's specification of the format tag.

    Software must process a multiple of nBlockAlign bytes of data at a time. Data written to and read from a device must always start at the beginning of a block. For example, it is illegal to start playback of PCM data in the middle of a sample (that is, on a non-block-aligned boundary).
  • wBitsPerSample
    Bits per sample for the wFormatTag format type. If wFormatTag is WAVE_FORMAT_PCM, then wBitsPerSample should be equal to 8 or 16. For non-PCM formats, this member must be set according to the manufacturer's specification of the format tag. If wFormatTag is WAVE_FORMAT_EXTENSIBLE, this value can be any integer multiple of 8 and represents the container size, not necessarily the sample size; for example, a 20-bit sample size is in a 24-bit container. Some compression schemes cannot define a value for wBitsPerSample, so this member can be 0.

callback int
Specifies the callback mechanism, or None.

instance int
User-instance data passed to the callback mechanism. This parameter is not used with the window callback mechanism.

fOpen int
  • CALLBACK_EVENT
    The dwCallback parameter is an event handle.
  • CALLBACK_NULL
    No callback mechanism. This is the default setting.
  • CALLBACK_THREAD
    The dwCallback parameter is a thread identifier.
  • CALLBACK_WINDOW
    The dwCallback parameter is a window handle.
  • WAVE_ALLOWSYNC
    If this flag is specified, a synchronous waveform-audio device can be opened. If this flag is not specified while opening a synchronous driver, the device will fail to open.
  • WAVE_MAPPED_DEFAULT_COMMUNICATION_DEVICE
    If this flag is specified and the uDeviceID parameter is WAVE_MAPPER, the function opens the default communication device. This flag applies only when uDeviceID equals WAVE_MAPPER. (Requires Windows 7)
  • WAVE_FORMAT_DIRECT
    If this flag is specified, the ACM driver does not perform conversions on the audio data.
  • WAVE_FORMAT_QUERY
    If this flag is specified, waveOutOpen queries the device to determine if it supports the given format, but the device is not actually opened.
  • WAVE_MAPPED
    If this flag is specified, the uDeviceID parameter specifies a waveform-audio device to be mapped to by the wave mapper.


waveOutPause

Note that this documentation has been automatically generated. It may be flawed or incorrect.

View waveOutPause on Microsoft Docs

1
2
def waveOutPause(hwo: HWAVEOUT) -> int:
...

waveOutPrepareHeader

1
2
def waveOutPrepareHeader(hwo: HWAVEOUT, hdr: tuple) -> tuple:
...

Description

The waveOutPrepareHeader function prepares a waveform-audio data block for playback. The return value should be used as the new wave header, as it is prepared for playback.

Parameters

hwo HWAVEOUT
Handle to the waveform-audio output device.

hdr tuple
Tuple that identifies the data block to be prepared. Must contain the followings values;
  • The data block to be prepared, as a bytearray object.
  • When the header is used in input, specifies how much data is in the buffer. If it is not used in input, set this value to 0.
  • User data, or 0.
  • A bitwise OR of zero of more flags.
  • Number of times to play the loop. This member is used only with output buffers. Zero if unused


waveOutRestart

Note that this documentation has been automatically generated. It may be flawed or incorrect.

View waveOutRestart on Microsoft Docs

1
2
def waveOutRestart(hwo: HWAVEOUT) -> int:
...

waveOutSetPitch

Note that this documentation has been automatically generated. It may be flawed or incorrect.

View waveOutSetPitch on Microsoft Docs

1
2
def waveOutSetPitch(hwo: HWAVEOUT, pitch: int) -> int:
...

waveOutSetVolume

Note that this documentation has been automatically generated. It may be flawed or incorrect.

View waveOutSetVolume on Microsoft Docs

1
2
def waveOutSetVolume(hwo: HWAVEOUT, left: int, right: int) -> int:
...

waveOutUnprepareHeader

1
2
def waveOutUnprepareHeader(hwo: HWAVEOUT, hdr: tuple) -> bool:
...

Description

Frees memory from the specified header and waveform-audio output device.

Parameters

hwo HWAVEOUT
Handle to the waveform-audio output device.

hdr tuple
The header to be freen


waveOutWrite

1
2
def waveOutWrite(hwo: HWAVEOUT, hdr: tuple) -> bool:
...

Description

Sends a data block to the given waveform-audio output device.

Parameters

hwo HWAVEOUT
Handle to the waveform-audio output device.

hdr tuple
The header containing the data block to be sent. For more information, please look under the waveOutPrepareHeader function.