Chris@55
|
1 #ifndef PA_WIN_DS_H
|
Chris@55
|
2 #define PA_WIN_DS_H
|
Chris@55
|
3 /*
|
Chris@55
|
4 * $Id: $
|
Chris@55
|
5 * PortAudio Portable Real-Time Audio Library
|
Chris@55
|
6 * DirectSound specific extensions
|
Chris@55
|
7 *
|
Chris@55
|
8 * Copyright (c) 1999-2007 Ross Bencina and Phil Burk
|
Chris@55
|
9 *
|
Chris@55
|
10 * Permission is hereby granted, free of charge, to any person obtaining
|
Chris@55
|
11 * a copy of this software and associated documentation files
|
Chris@55
|
12 * (the "Software"), to deal in the Software without restriction,
|
Chris@55
|
13 * including without limitation the rights to use, copy, modify, merge,
|
Chris@55
|
14 * publish, distribute, sublicense, and/or sell copies of the Software,
|
Chris@55
|
15 * and to permit persons to whom the Software is furnished to do so,
|
Chris@55
|
16 * subject to the following conditions:
|
Chris@55
|
17 *
|
Chris@55
|
18 * The above copyright notice and this permission notice shall be
|
Chris@55
|
19 * included in all copies or substantial portions of the Software.
|
Chris@55
|
20 *
|
Chris@55
|
21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
Chris@55
|
22 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
Chris@55
|
23 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
Chris@55
|
24 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
|
Chris@55
|
25 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
Chris@55
|
26 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
Chris@55
|
27 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
Chris@55
|
28 */
|
Chris@55
|
29
|
Chris@55
|
30 /*
|
Chris@55
|
31 * The text above constitutes the entire PortAudio license; however,
|
Chris@55
|
32 * the PortAudio community also makes the following non-binding requests:
|
Chris@55
|
33 *
|
Chris@55
|
34 * Any person wishing to distribute modifications to the Software is
|
Chris@55
|
35 * requested to send the modifications to the original developer so that
|
Chris@55
|
36 * they can be incorporated into the canonical version. It is also
|
Chris@55
|
37 * requested that these non-binding requests be included along with the
|
Chris@55
|
38 * license above.
|
Chris@55
|
39 */
|
Chris@55
|
40
|
Chris@55
|
41 /** @file
|
Chris@55
|
42 @ingroup public_header
|
Chris@55
|
43 @brief DirectSound-specific PortAudio API extension header file.
|
Chris@55
|
44 */
|
Chris@55
|
45
|
Chris@55
|
46 #include "portaudio.h"
|
Chris@55
|
47 #include "pa_win_waveformat.h"
|
Chris@55
|
48
|
Chris@55
|
49 #ifdef __cplusplus
|
Chris@55
|
50 extern "C"
|
Chris@55
|
51 {
|
Chris@55
|
52 #endif /* __cplusplus */
|
Chris@55
|
53
|
Chris@55
|
54
|
Chris@55
|
55 #define paWinDirectSoundUseLowLevelLatencyParameters (0x01)
|
Chris@55
|
56 #define paWinDirectSoundUseChannelMask (0x04)
|
Chris@55
|
57
|
Chris@55
|
58
|
Chris@55
|
59 typedef struct PaWinDirectSoundStreamInfo{
|
Chris@55
|
60 unsigned long size; /**< sizeof(PaWinDirectSoundStreamInfo) */
|
Chris@55
|
61 PaHostApiTypeId hostApiType; /**< paDirectSound */
|
Chris@55
|
62 unsigned long version; /**< 2 */
|
Chris@55
|
63
|
Chris@55
|
64 unsigned long flags; /**< enable other features of this struct */
|
Chris@55
|
65
|
Chris@55
|
66 /**
|
Chris@55
|
67 low-level latency setting support
|
Chris@55
|
68 Sets the size of the DirectSound host buffer.
|
Chris@55
|
69 When flags contains the paWinDirectSoundUseLowLevelLatencyParameters
|
Chris@55
|
70 this size will be used instead of interpreting the generic latency
|
Chris@55
|
71 parameters to Pa_OpenStream(). If the flag is not set this value is ignored.
|
Chris@55
|
72
|
Chris@55
|
73 If the stream is a full duplex stream the implementation requires that
|
Chris@55
|
74 the values of framesPerBuffer for input and output match (if both are specified).
|
Chris@55
|
75 */
|
Chris@55
|
76 unsigned long framesPerBuffer;
|
Chris@55
|
77
|
Chris@55
|
78 /**
|
Chris@55
|
79 support for WAVEFORMATEXTENSIBLE channel masks. If flags contains
|
Chris@55
|
80 paWinDirectSoundUseChannelMask this allows you to specify which speakers
|
Chris@55
|
81 to address in a multichannel stream. Constants for channelMask
|
Chris@55
|
82 are specified in pa_win_waveformat.h
|
Chris@55
|
83
|
Chris@55
|
84 */
|
Chris@55
|
85 PaWinWaveFormatChannelMask channelMask;
|
Chris@55
|
86
|
Chris@55
|
87 }PaWinDirectSoundStreamInfo;
|
Chris@55
|
88
|
Chris@55
|
89
|
Chris@55
|
90
|
Chris@55
|
91 #ifdef __cplusplus
|
Chris@55
|
92 }
|
Chris@55
|
93 #endif /* __cplusplus */
|
Chris@55
|
94
|
Chris@55
|
95 #endif /* PA_WIN_DS_H */
|