annotate win64-msvc/include/pa_win_wmme.h @ 45:d530e058a1c1

64-bit MSVC builds
author Chris Cannam
date Tue, 18 Oct 2016 15:59:23 +0100
parents
children 95867ba8caa8
rev   line source
Chris@45 1 #ifndef PA_WIN_WMME_H
Chris@45 2 #define PA_WIN_WMME_H
Chris@45 3 /*
Chris@45 4 * $Id: pa_win_wmme.h 1592 2011-02-04 10:41:58Z rossb $
Chris@45 5 * PortAudio Portable Real-Time Audio Library
Chris@45 6 * MME specific extensions
Chris@45 7 *
Chris@45 8 * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
Chris@45 9 *
Chris@45 10 * Permission is hereby granted, free of charge, to any person obtaining
Chris@45 11 * a copy of this software and associated documentation files
Chris@45 12 * (the "Software"), to deal in the Software without restriction,
Chris@45 13 * including without limitation the rights to use, copy, modify, merge,
Chris@45 14 * publish, distribute, sublicense, and/or sell copies of the Software,
Chris@45 15 * and to permit persons to whom the Software is furnished to do so,
Chris@45 16 * subject to the following conditions:
Chris@45 17 *
Chris@45 18 * The above copyright notice and this permission notice shall be
Chris@45 19 * included in all copies or substantial portions of the Software.
Chris@45 20 *
Chris@45 21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
Chris@45 22 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
Chris@45 23 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
Chris@45 24 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
Chris@45 25 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
Chris@45 26 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
Chris@45 27 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Chris@45 28 */
Chris@45 29
Chris@45 30 /*
Chris@45 31 * The text above constitutes the entire PortAudio license; however,
Chris@45 32 * the PortAudio community also makes the following non-binding requests:
Chris@45 33 *
Chris@45 34 * Any person wishing to distribute modifications to the Software is
Chris@45 35 * requested to send the modifications to the original developer so that
Chris@45 36 * they can be incorporated into the canonical version. It is also
Chris@45 37 * requested that these non-binding requests be included along with the
Chris@45 38 * license above.
Chris@45 39 */
Chris@45 40
Chris@45 41 /** @file
Chris@45 42 @ingroup public_header
Chris@45 43 @brief WMME-specific PortAudio API extension header file.
Chris@45 44 */
Chris@45 45
Chris@45 46 #include "portaudio.h"
Chris@45 47 #include "pa_win_waveformat.h"
Chris@45 48
Chris@45 49 #ifdef __cplusplus
Chris@45 50 extern "C"
Chris@45 51 {
Chris@45 52 #endif /* __cplusplus */
Chris@45 53
Chris@45 54
Chris@45 55 /* The following are flags which can be set in
Chris@45 56 PaWinMmeStreamInfo's flags field.
Chris@45 57 */
Chris@45 58
Chris@45 59 #define paWinMmeUseLowLevelLatencyParameters (0x01)
Chris@45 60 #define paWinMmeUseMultipleDevices (0x02) /* use mme specific multiple device feature */
Chris@45 61 #define paWinMmeUseChannelMask (0x04)
Chris@45 62
Chris@45 63 /* By default, the mme implementation drops the processing thread's priority
Chris@45 64 to THREAD_PRIORITY_NORMAL and sleeps the thread if the CPU load exceeds 100%
Chris@45 65 This flag disables any priority throttling. The processing thread will always
Chris@45 66 run at THREAD_PRIORITY_TIME_CRITICAL.
Chris@45 67 */
Chris@45 68 #define paWinMmeDontThrottleOverloadedProcessingThread (0x08)
Chris@45 69
Chris@45 70 /* Flags for non-PCM spdif passthrough.
Chris@45 71 */
Chris@45 72 #define paWinMmeWaveFormatDolbyAc3Spdif (0x10)
Chris@45 73 #define paWinMmeWaveFormatWmaSpdif (0x20)
Chris@45 74
Chris@45 75
Chris@45 76 typedef struct PaWinMmeDeviceAndChannelCount{
Chris@45 77 PaDeviceIndex device;
Chris@45 78 int channelCount;
Chris@45 79 }PaWinMmeDeviceAndChannelCount;
Chris@45 80
Chris@45 81
Chris@45 82 typedef struct PaWinMmeStreamInfo{
Chris@45 83 unsigned long size; /**< sizeof(PaWinMmeStreamInfo) */
Chris@45 84 PaHostApiTypeId hostApiType; /**< paMME */
Chris@45 85 unsigned long version; /**< 1 */
Chris@45 86
Chris@45 87 unsigned long flags;
Chris@45 88
Chris@45 89 /* low-level latency setting support
Chris@45 90 These settings control the number and size of host buffers in order
Chris@45 91 to set latency. They will be used instead of the generic parameters
Chris@45 92 to Pa_OpenStream() if flags contains the PaWinMmeUseLowLevelLatencyParameters
Chris@45 93 flag.
Chris@45 94
Chris@45 95 If PaWinMmeStreamInfo structures with PaWinMmeUseLowLevelLatencyParameters
Chris@45 96 are supplied for both input and output in a full duplex stream, then the
Chris@45 97 input and output framesPerBuffer must be the same, or the larger of the
Chris@45 98 two must be a multiple of the smaller, otherwise a
Chris@45 99 paIncompatibleHostApiSpecificStreamInfo error will be returned from
Chris@45 100 Pa_OpenStream().
Chris@45 101 */
Chris@45 102 unsigned long framesPerBuffer;
Chris@45 103 unsigned long bufferCount; /* formerly numBuffers */
Chris@45 104
Chris@45 105 /* multiple devices per direction support
Chris@45 106 If flags contains the PaWinMmeUseMultipleDevices flag,
Chris@45 107 this functionality will be used, otherwise the device parameter to
Chris@45 108 Pa_OpenStream() will be used instead.
Chris@45 109 If devices are specified here, the corresponding device parameter
Chris@45 110 to Pa_OpenStream() should be set to paUseHostApiSpecificDeviceSpecification,
Chris@45 111 otherwise an paInvalidDevice error will result.
Chris@45 112 The total number of channels accross all specified devices
Chris@45 113 must agree with the corresponding channelCount parameter to
Chris@45 114 Pa_OpenStream() otherwise a paInvalidChannelCount error will result.
Chris@45 115 */
Chris@45 116 PaWinMmeDeviceAndChannelCount *devices;
Chris@45 117 unsigned long deviceCount;
Chris@45 118
Chris@45 119 /*
Chris@45 120 support for WAVEFORMATEXTENSIBLE channel masks. If flags contains
Chris@45 121 paWinMmeUseChannelMask this allows you to specify which speakers
Chris@45 122 to address in a multichannel stream. Constants for channelMask
Chris@45 123 are specified in pa_win_waveformat.h
Chris@45 124
Chris@45 125 */
Chris@45 126 PaWinWaveFormatChannelMask channelMask;
Chris@45 127
Chris@45 128 }PaWinMmeStreamInfo;
Chris@45 129
Chris@45 130
Chris@45 131 /** Retrieve the number of wave in handles used by a PortAudio WinMME stream.
Chris@45 132 Returns zero if the stream is output only.
Chris@45 133
Chris@45 134 @return A non-negative value indicating the number of wave in handles
Chris@45 135 or, a PaErrorCode (which are always negative) if PortAudio is not initialized
Chris@45 136 or an error is encountered.
Chris@45 137
Chris@45 138 @see PaWinMME_GetStreamInputHandle
Chris@45 139 */
Chris@45 140 int PaWinMME_GetStreamInputHandleCount( PaStream* stream );
Chris@45 141
Chris@45 142
Chris@45 143 /** Retrieve a wave in handle used by a PortAudio WinMME stream.
Chris@45 144
Chris@45 145 @param stream The stream to query.
Chris@45 146 @param handleIndex The zero based index of the wave in handle to retrieve. This
Chris@45 147 should be in the range [0, PaWinMME_GetStreamInputHandleCount(stream)-1].
Chris@45 148
Chris@45 149 @return A valid wave in handle, or NULL if an error occurred.
Chris@45 150
Chris@45 151 @see PaWinMME_GetStreamInputHandle
Chris@45 152 */
Chris@45 153 HWAVEIN PaWinMME_GetStreamInputHandle( PaStream* stream, int handleIndex );
Chris@45 154
Chris@45 155
Chris@45 156 /** Retrieve the number of wave out handles used by a PortAudio WinMME stream.
Chris@45 157 Returns zero if the stream is input only.
Chris@45 158
Chris@45 159 @return A non-negative value indicating the number of wave out handles
Chris@45 160 or, a PaErrorCode (which are always negative) if PortAudio is not initialized
Chris@45 161 or an error is encountered.
Chris@45 162
Chris@45 163 @see PaWinMME_GetStreamOutputHandle
Chris@45 164 */
Chris@45 165 int PaWinMME_GetStreamOutputHandleCount( PaStream* stream );
Chris@45 166
Chris@45 167
Chris@45 168 /** Retrieve a wave out handle used by a PortAudio WinMME stream.
Chris@45 169
Chris@45 170 @param stream The stream to query.
Chris@45 171 @param handleIndex The zero based index of the wave out handle to retrieve.
Chris@45 172 This should be in the range [0, PaWinMME_GetStreamOutputHandleCount(stream)-1].
Chris@45 173
Chris@45 174 @return A valid wave out handle, or NULL if an error occurred.
Chris@45 175
Chris@45 176 @see PaWinMME_GetStreamOutputHandleCount
Chris@45 177 */
Chris@45 178 HWAVEOUT PaWinMME_GetStreamOutputHandle( PaStream* stream, int handleIndex );
Chris@45 179
Chris@45 180
Chris@45 181 #ifdef __cplusplus
Chris@45 182 }
Chris@45 183 #endif /* __cplusplus */
Chris@45 184
Chris@45 185 #endif /* PA_WIN_WMME_H */