Chris@4: #ifndef PA_WIN_DS_H Chris@4: #define PA_WIN_DS_H Chris@4: /* Chris@4: * $Id: $ Chris@4: * PortAudio Portable Real-Time Audio Library Chris@4: * DirectSound specific extensions Chris@4: * Chris@4: * Copyright (c) 1999-2007 Ross Bencina and Phil Burk Chris@4: * Chris@4: * Permission is hereby granted, free of charge, to any person obtaining Chris@4: * a copy of this software and associated documentation files Chris@4: * (the "Software"), to deal in the Software without restriction, Chris@4: * including without limitation the rights to use, copy, modify, merge, Chris@4: * publish, distribute, sublicense, and/or sell copies of the Software, Chris@4: * and to permit persons to whom the Software is furnished to do so, Chris@4: * subject to the following conditions: Chris@4: * Chris@4: * The above copyright notice and this permission notice shall be Chris@4: * included in all copies or substantial portions of the Software. Chris@4: * Chris@4: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, Chris@4: * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF Chris@4: * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. Chris@4: * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR Chris@4: * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF Chris@4: * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION Chris@4: * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Chris@4: */ Chris@4: Chris@4: /* Chris@4: * The text above constitutes the entire PortAudio license; however, Chris@4: * the PortAudio community also makes the following non-binding requests: Chris@4: * Chris@4: * Any person wishing to distribute modifications to the Software is Chris@4: * requested to send the modifications to the original developer so that Chris@4: * they can be incorporated into the canonical version. It is also Chris@4: * requested that these non-binding requests be included along with the Chris@4: * license above. Chris@4: */ Chris@4: Chris@4: /** @file Chris@4: @ingroup public_header Chris@4: @brief DirectSound-specific PortAudio API extension header file. Chris@4: */ Chris@4: Chris@4: #include "portaudio.h" Chris@4: #include "pa_win_waveformat.h" Chris@4: Chris@4: #ifdef __cplusplus Chris@4: extern "C" Chris@4: { Chris@4: #endif /* __cplusplus */ Chris@4: Chris@4: Chris@4: #define paWinDirectSoundUseLowLevelLatencyParameters (0x01) Chris@4: #define paWinDirectSoundUseChannelMask (0x04) Chris@4: Chris@4: Chris@4: typedef struct PaWinDirectSoundStreamInfo{ Chris@4: unsigned long size; /**< sizeof(PaWinDirectSoundStreamInfo) */ Chris@4: PaHostApiTypeId hostApiType; /**< paDirectSound */ Chris@4: unsigned long version; /**< 2 */ Chris@4: Chris@4: unsigned long flags; Chris@4: Chris@4: /* low-level latency setting support Chris@4: Control the size of host buffers in order to set latency. They will Chris@4: be used instead of the generic parameters to Pa_OpenStream() if Chris@4: flags contains the paWinDirectSoundUseLowLevelLatencyParameters Chris@4: flag. Chris@4: Chris@4: If PaWinDirectSoundStreamInfo structures with paWinDirectSoundUseLowLevelLatencyParameters Chris@4: are supplied for both input and output in a full duplex stream, then the Chris@4: input and output framesPerBuffer must be the same, or the larger of the Chris@4: two must be a multiple of the smaller, otherwise a Chris@4: paIncompatibleHostApiSpecificStreamInfo error will be returned from Chris@4: Pa_OpenStream(). Chris@4: */ Chris@4: unsigned long framesPerBuffer; /* NOT IMPLEMENTED see http://www.portaudio.com/trac/ticket/129 */ Chris@4: Chris@4: /* Chris@4: support for WAVEFORMATEXTENSIBLE channel masks. If flags contains Chris@4: paWinDirectSoundUseChannelMask this allows you to specify which speakers Chris@4: to address in a multichannel stream. Constants for channelMask Chris@4: are specified in pa_win_waveformat.h Chris@4: Chris@4: */ Chris@4: PaWinWaveFormatChannelMask channelMask; Chris@4: Chris@4: }PaWinDirectSoundStreamInfo; Chris@4: Chris@4: Chris@4: Chris@4: #ifdef __cplusplus Chris@4: } Chris@4: #endif /* __cplusplus */ Chris@4: Chris@4: #endif /* PA_WIN_DS_H */