pa_win_ds.h 3.4 KB

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