|
From: D. S. <new...@gm...> - 2008-01-21 05:44:53
|
Also, I didn't think of this until now, but I bet the source for the cygwin1.dll itself has the /dev/dsp support down in there somewhere. (I just downloaded a cygwin dll source tarball and peeked a little.) ~/cygwin $ cat ./cygwin-1.1.8-2/winsup/w32api/lib/dsound.def ; from DirectX 6.1 LIBRARY "DSOUND.dll" EXPORTS DirectSoundCaptureCreate@12 DirectSoundCaptureEnumerateA@8 DirectSoundCaptureEnumerateW@8 DirectSoundCreate@12 DirectSoundEnumerateA@8 DirectSoundEnumerateW@8 Seems to use the Windows The DirectSound API in dsound.dll ~/cygwin/cygwin-1.1.8-2/winsup/w32api/lib $ v dxguid.c 363 ///////////////////////////////////////////////////////////////////// 364 // File DSOUND.H: 365 ///////////////////////////////////////////////////////////////////// 366 367 DEFINE_GUID(CLSID_DirectSound,0x47d4d946,0x62e8,0x11cf,0x93,0xbc,0x44,0x45,0x53,0x54,0x0,0x0); 368 DEFINE_GUID(CLSID_DirectSoundCapture,0xb0210780,0x89cd,0x11d0,0xaf,0x8,0x0,0xa0,0xc9,0x25,0xcd,0x16); 369 DEFINE_GUID(IID_IDirectSound,0x279AFA83,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60); 370 DEFINE_GUID(IID_IDirectSoundBuffer,0x279AFA85,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60); ... Here's something re dsound.h http://www.koders.com/c/fid7C7D7FB2A2198688B5ECA561C93F0A5BF2D011EB.aspx Similar tricks for dplayx.def and associated dplayx.dll and dplay.h: http://www.koders.com/cpp/fidA58F9027C4021F40A58DE7A6744E7043B8C67819.aspx Ugh! That's cruel and unusual punishment. (Then there is a /usr/lib/w32api/libdplayx.a I notice. I don't know. but I bet that's an import library for the dplayx.dll with the Windows API.) Maybe going about it from the other end (where the Cygwin1.dll emulates a /dev/dsp) will look nicer. But I don't see "dsp" in the myriad *.c and *.h files there Hmmm. Also, maybe someone has an open source win32 library that encapsulates the DirectX sound play functions more simply. On Jan 20, 2008 7:08 PM, Chris Bagwell <ch...@cn...> wrote: > Thats the key thing... If we can borrow some code from an existing > program that compiles with mingw then it would be pretty easy to write a > driver to write directly to windows audio device. > > I'll keep those to suggestions in mind... I'll look into both TiMidity++ > and SDL and see how easy it would be to port any existing windows drivers. > > Anybody know of other programs with Windows audio drivers that compile > with mingw? > > Chris |