1 2 | def midiOutClose(hwo: HMIDIOUT) -> int: |
1 2 | def midiOutLongMsg(hmo: HMIDIOUT, pytup: midihdr) -> int: |
1 2 | def midiOutOpen(device_id: int, dw_callback: int, dw_instance: int, dopen: int) -> HANDLE: |
1 2 | def midiOutPrepareHeader(h_out: HMIDIOUT, b_arr: bytearray, user: int, flags: int): |
1 2 | def midiOutReset(hmo: HMIDIOUT) -> int: |
1 2 | def midiOutSetVolume(hwo: HMIDIOUT, dw_lo: int, dw_hi: int) -> int: |
1 2 | def midiOutShortMsg(hwo: HMIDIOUT, dw_lo: int) -> int: |
1 2 | def midiOutShortMsgFromBytes(hmo: HMIDIOUT, first_byte: int, second_byte: int, third_byte: int) -> int: |
1 2 | def midiOutUnprepareHeader(hmo: HMIDIOUT, pytup: midihdr) -> int: |
1 2 | def waveOutClose(hwo: HWAVEOUT) -> bool: |
Handle to the waveform-audio output device.
1 2 | def waveOutGetDevCaps(device_id: int): |
1 2 | def waveOutGetID(hwo: HWAVEOUT) -> int: |
1 2 | def waveOutGetNumDevs() -> int: |
1 2 | def waveOutGetPitch(hwo: HWAVEOUT) -> int: |
1 2 | def waveOutGetPlaybackRate(hwo: HWAVEOUT) -> int: |
1 2 | def waveOutGetVolume(hwo: HWAVEOUT) -> HH: |
1 2 | def waveOutOpen(deviceID: int, wfx: tuple, callback: int, instance: int, fOpen: int) -> HWAVEOUT: |
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.
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.
Specifies the callback mechanism, or None.
User-instance data passed to the callback mechanism. This parameter is not used with the window callback mechanism.
- 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.
1 2 | def waveOutPause(hwo: HWAVEOUT) -> int: |
1 2 | def waveOutPrepareHeader(hwo: HWAVEOUT, hdr: tuple) -> tuple: |
Handle to the waveform-audio output device.
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
1 2 | def waveOutRestart(hwo: HWAVEOUT) -> int: |
1 2 | def waveOutSetPitch(hwo: HWAVEOUT, pitch: int) -> int: |
1 2 | def waveOutSetVolume(hwo: HWAVEOUT, left: int, right: int) -> int: |
1 2 | def waveOutUnprepareHeader(hwo: HWAVEOUT, hdr: tuple) -> bool: |
Handle to the waveform-audio output device.
The header to be freen
1 2 | def waveOutWrite(hwo: HWAVEOUT, hdr: tuple) -> bool: |
Handle to the waveform-audio output device.
The header containing the data block to be sent. For more information, please look under the waveOutPrepareHeader function.