00001 /* 00002 * Interface for dynamically loading directsound and providing a dummy 00003 * implementation if it isn't present. 00004 * 00005 * Author: Ross Bencina (some portions Phil Burk & Robert Marsanyi) 00006 * 00007 * For PortAudio Portable Real-Time Audio Library 00008 * For more information see: http://www.portaudio.com 00009 * Copyright (c) 1999-2006 Phil Burk, Robert Marsanyi and Ross Bencina 00010 * 00011 * Permission is hereby granted, free of charge, to any person obtaining 00012 * a copy of this software and associated documentation files 00013 * (the "Software"), to deal in the Software without restriction, 00014 * including without limitation the rights to use, copy, modify, merge, 00015 * publish, distribute, sublicense, and/or sell copies of the Software, 00016 * and to permit persons to whom the Software is furnished to do so, 00017 * subject to the following conditions: 00018 * 00019 * The above copyright notice and this permission notice shall be 00020 * included in all copies or substantial portions of the Software. 00021 * 00022 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 00023 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00024 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 00025 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 00026 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 00027 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 00028 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00029 */ 00030 00031 /* 00032 * The text above constitutes the entire PortAudio license; however, 00033 * the PortAudio community also makes the following non-binding requests: 00034 * 00035 * Any person wishing to distribute modifications to the Software is 00036 * requested to send the modifications to the original developer so that 00037 * they can be incorporated into the canonical version. It is also 00038 * requested that these non-binding requests be included along with the 00039 * license above. 00040 */ 00041 00047 #ifndef INCLUDED_PA_DSOUND_DYNLINK_H 00048 #define INCLUDED_PA_DSOUND_DYNLINK_H 00049 00050 /* on Borland compilers, WIN32 doesn't seem to be defined by default, which 00051 breaks dsound.h. Adding the define here fixes the problem. - rossb. */ 00052 #ifdef __BORLANDC__ 00053 #if !defined(WIN32) 00054 #define WIN32 00055 #endif 00056 #endif 00057 00058 /* 00059 We are only using DX3 in here, no need to polute the namespace - davidv 00060 */ 00061 #define DIRECTSOUND_VERSION 0x0300 00062 #include <dsound.h> 00063 00064 #ifdef __cplusplus 00065 extern "C" 00066 { 00067 #endif /* __cplusplus */ 00068 00069 00070 typedef struct 00071 { 00072 HINSTANCE hInstance_; 00073 00074 HRESULT (WINAPI *DllGetClassObject)(REFCLSID , REFIID , LPVOID *); 00075 00076 HRESULT (WINAPI *DirectSoundCreate)(LPGUID, LPDIRECTSOUND *, LPUNKNOWN); 00077 HRESULT (WINAPI *DirectSoundEnumerateW)(LPDSENUMCALLBACKW, LPVOID); 00078 HRESULT (WINAPI *DirectSoundEnumerateA)(LPDSENUMCALLBACKA, LPVOID); 00079 00080 HRESULT (WINAPI *DirectSoundCaptureCreate)(LPGUID, LPDIRECTSOUNDCAPTURE *, LPUNKNOWN); 00081 HRESULT (WINAPI *DirectSoundCaptureEnumerateW)(LPDSENUMCALLBACKW, LPVOID); 00082 HRESULT (WINAPI *DirectSoundCaptureEnumerateA)(LPDSENUMCALLBACKA, LPVOID); 00083 }PaWinDsDSoundEntryPoints; 00084 00085 extern PaWinDsDSoundEntryPoints paWinDsDSoundEntryPoints; 00086 00087 void PaWinDs_InitializeDSoundEntryPoints(void); 00088 void PaWinDs_TerminateDSoundEntryPoints(void); 00089 00090 00091 #ifdef __cplusplus 00092 } 00093 #endif /* __cplusplus */ 00094 00095 #endif /* INCLUDED_PA_DSOUND_DYNLINK_H */