[Stk] DirectSound on Windows 7?

Nick caprice24 at yahoo.com
Thu Mar 10 13:22:41 PST 2011


Hi Joseph,
 
Thanks that was helpful and it now works.
 
Now I have a different question. When I create a pure sine wave with the sine example in the projects folder, I noticed that the frequency that when playing it back throught he dac-> tick, I get a slightly different frequency that is played back than when it is played back through the Windows Media player as a wave file. Could it be that somehow the sampling frequency information is not being correctly put into the wave file?  
 
It is noticable, the dac->tick plays the A 440 (at 48 KHz sampling) a whole tone lower than the A 440 which plays back through Windows Media player when I generate the wave file.
 
Any ideas what I'm doing wrong?
 
Thanks,
Nick
--- On Thu, 3/10/11, Joseph Cooper <josephcooper at gmail.com> wrote:


From: Joseph Cooper <josephcooper at gmail.com>
Subject: Re: [Stk] DirectSound on Windows 7?
To: "Nick" <caprice24 at yahoo.com>
Cc: stk at ccrma.stanford.edu
Date: Thursday, March 10, 2011, 8:06 AM


It sounds like you're just not telling the compiler to link the right thing.  If it were a matter of the library not being supported, you would be told that the library wasn't there, or you'd get an error before linking.  Open properties for the project and go to
Configuration Properties > Linker > Input and make sure that Dsound.lib is there.
If it is already there, then perhaps, somehow, your WinDef.h is confused and so the WINAPI macro is defined wrong when you include <dsound.h> and consequently the function signature doesn't match the one found in dsound.lib.

jc


On Thu, Mar 10, 2011 at 12:06 AM, Nick <caprice24 at yahoo.com> wrote:






Hi,
I'm having trouble with the following cpp files:
RtAudio
RTMidi
RtWvIn
RtWvOut
 
which I understand make use of DirectSound API in Windows. Since I'm running Windows 7 on a 64 bit laptop, I'm wondering if the reason these files are failing to link is because DirectSound is no longer supported on Win 7?
 
I do have the preprocessor directive _WINDOWS_DS_   specified on the C++ command line build argument with Visual Studio 2010.
 
Errors from the compile are shown below.
 
Thanks,
Nick
 
1>RtAudio.obj : error LNK2019: unresolved external symbol _DirectSoundCaptureEnumerateA at 8 referenced in function "public: virtual unsigned int __thiscall RtApiDs::getDeviceCount(void)" (?getDeviceCount at RtApiDs@@UAEIXZ)
1>RtAudio.obj : error LNK2019: unresolved external symbol _DirectSoundEnumerateA at 8 referenced in function "public: virtual unsigned int __thiscall RtApiDs::getDeviceCount(void)" (?getDeviceCount at RtApiDs@@UAEIXZ)
1>RtAudio.obj : error LNK2019: unresolved external symbol _DirectSoundCaptureCreate at 12 referenced in function "public: virtual struct RtAudio::DeviceInfo __thiscall RtApiDs::getDeviceInfo(unsigned int)" (?getDeviceInfo at RtApiDs@@UAE?AUDeviceInfo at RtAudio@@I at Z)
1>RtAudio.obj : error LNK2019: unresolved external symbol _DirectSoundCreate at 12 referenced in function "public: virtual struct RtAudio::DeviceInfo __thiscall RtApiDs::getDeviceInfo(unsigned int)" (?getDeviceInfo at RtApiDs@@UAE?AUDeviceInfo at RtAudio@@I at Z)
1>RtWvIn.obj : error LNK2019: unresolved external symbol "public: void __thiscall stk::Mutex::unlock(void)" (?unlock at Mutex@stk@@QAEXXZ) referenced in function "public: void __thiscall stk::RtWvIn::fillBuffer(void *,unsigned int)" (?fillBuffer at RtWvIn@stk@@QAEXPAXI at Z)
1>RtWvOut.obj : error LNK2001: unresolved external symbol "public: void __thiscall stk::Mutex::unlock(void)" (?unlock at Mutex@stk@@QAEXXZ)
1>RtWvIn.obj : error LNK2019: unresolved external symbol "public: void __thiscall stk::Mutex::lock(void)" (?lock at Mutex@stk@@QAEXXZ) referenced in function "public: void __thiscall stk::RtWvIn::fillBuffer(void *,unsigned int)" (?fillBuffer at RtWvIn@stk@@QAEXPAXI at Z)
1>RtWvOut.obj : error LNK2001: unresolved external symbol "public: void __thiscall stk::Mutex::lock(void)" (?lock at Mutex@stk@@QAEXXZ)
1>RtWvIn.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall stk::Mutex::~Mutex(void)" (??1Mutex at stk@@UAE at XZ) referenced in function "public: virtual __thiscall stk::RtWvIn::~RtWvIn(void)" (??1RtWvIn at stk@@UAE at XZ)
1>RtWvOut.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall stk::Mutex::~Mutex(void)" (??1Mutex at stk@@UAE at XZ)
1>RtWvIn.obj : error LNK2019: unresolved external symbol "public: __thiscall stk::Mutex::Mutex(void)" (??0Mutex at stk@@QAE at XZ) referenced in function "public: __thiscall stk::RtWvIn::RtWvIn(unsigned int,double,int,int,int)" (??0RtWvIn at stk@@QAE at INHHH@Z)
1>RtWvOut.obj : error LNK2001: unresolved external symbol "public: __thiscall stk::Mutex::Mutex(void)" (??0Mutex at stk@@QAE at XZ)
1>.\sine.exe : fatal error LNK1120: 8 unresolved externals
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:10.83
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

_______________________________________________
Stk mailing list
Stk at ccrma.stanford.edu
http://ccrma-mail.stanford.edu/mailman/listinfo/stk





      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ccrma-mail.stanford.edu/pipermail/stk/attachments/20110310/29c31ef5/attachment.html 


More information about the Stk mailing list