pa_win_ds_dynlink.h

Go to the documentation of this file.
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 
00042 
00043 #ifndef INCLUDED_PA_DSOUND_DYNLINK_H
00044 #define INCLUDED_PA_DSOUND_DYNLINK_H
00045 
00046 /* on Borland compilers, WIN32 doesn't seem to be defined by default, which
00047     breaks DSound.h. Adding the define here fixes the problem. - rossb. */
00048 #ifdef __BORLANDC__
00049 #if !defined(WIN32)
00050 #define WIN32
00051 #endif
00052 #endif
00053 
00054 /*
00055   We are only using DX3 in here, no need to polute the namespace - davidv
00056 */
00057 #define DIRECTSOUND_VERSION 0x0300
00058 
00059 #include <DSound.h>
00060 
00061 #ifdef __cplusplus
00062 extern "C"
00063 {
00064 #endif /* __cplusplus */
00065 
00066 
00067 typedef struct
00068 {
00069     HINSTANCE hInstance_;
00070     
00071     HRESULT (WINAPI *DirectSoundCreate)(LPGUID, LPDIRECTSOUND *, LPUNKNOWN);
00072     HRESULT (WINAPI *DirectSoundEnumerateW)(LPDSENUMCALLBACKW, LPVOID);
00073     HRESULT (WINAPI *DirectSoundEnumerateA)(LPDSENUMCALLBACKA, LPVOID);
00074 
00075     HRESULT (WINAPI *DirectSoundCaptureCreate)(LPGUID, LPDIRECTSOUNDCAPTURE *, LPUNKNOWN);
00076     HRESULT (WINAPI *DirectSoundCaptureEnumerateW)(LPDSENUMCALLBACKW, LPVOID);
00077     HRESULT (WINAPI *DirectSoundCaptureEnumerateA)(LPDSENUMCALLBACKA, LPVOID);
00078 }PaWinDsDSoundEntryPoints;
00079 
00080 extern PaWinDsDSoundEntryPoints paWinDsDSoundEntryPoints;
00081 
00082 void PaWinDs_InitializeDSoundEntryPoints(void);
00083 void PaWinDs_TerminateDSoundEntryPoints(void);
00084 
00085 
00086 #ifdef __cplusplus
00087 }
00088 #endif /* __cplusplus */
00089 
00090 #endif /* INCLUDED_PA_DSOUND_DYNLINK_H */

Generated on Fri Nov 17 07:08:00 2006 for PortAudio by  doxygen 1.5.1