[Stk] DirectSound on Windows 7?

Joseph Cooper josephcooper at gmail.com
Thu Mar 10 13:36:42 PST 2011


You're talking about things I don't have much experience with, but it
stands to reason that your playback frequency doesn't match the
frequency written to the wave file so perhaps one of the two is wrong
(or windows media player isn't playing fair).  I guess I would try
opening the wave file in audacity to see what it reports for a
sampling rate.  Then I'd dig around and see exactly what the device
sample rate is set to when you're doing the original playback.

jc

On Thu, Mar 10, 2011 at 3:22 PM, Nick <caprice24 at yahoo.com> wrote:
>
> 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
>
>
>



More information about the Stk mailing list