I am using Audio Weaver to make a DTMF tone, which I am using to test another system. I add together two sine waves as seen in the attached .awd. I take the headphone output to my scope. I reduce the amplitude of each sine wave in turn and I see just the other sine wave. The problem is that neither sine wave is at the frequency selected in my app. For example, 1209 Hz appears about 100 Hz low, and 852 Hz appears about 60 Hz low.
I get the same results for computers with different sound cards. I have confirmed that the sound cards are using the same sampling frequency as my app (48 kHz) and no enhancements are operating.
Any ideas what is going on? I was expecting to see whatever frequency I put on the sine generation dial.create_dtmf_one_sine.awd
4:41pm
Hello,
It looks like your layout may be running at 44100 Hz rather than the 48 KHz you specified. 44100/48000 = 0.92, which roughly matches the ratio of actual to expected frequencies. Can you check the sample rate reported in the AWE Server when you run your layout?
As further verification that your system is running at 48 KHz, you can add a 'timer' to the layout that should count at the same speed as a wall clock (or, more likely, your cell phone's stop watch). If this timer is slow then it's likely that your application is operating at 44.1 KHz. See attached .awd.
create_dtmf_one_sine_0_timer.awd
Let us know if you're still stuck and we can continue to help debug the problem.
Thanks
-Axel
5:49pm
The AW Server reports 48000 Hz. This is confirmed in the Audio Weaver Server File Preferences. I will try your file though also and see if I learn anything new...
3:21pm
Hi Axel! I did some more experiments. When I run my app in Native mode, headphones in PC headphone jack, the Server shows a sample rate of 48000Hz in the Target Information window, but a 44100 Hz sampling rate at the top of the window (the place you circled above). Under File-Preferences the default sample rate is 48000. My sound card is set to 48 kHz for both speakers and mic. I can find no reference to 44.1 kHz, yet this appears to be the sampling rate that is in effect. All the frequencies appearing on my scope are low as a result.
When I change to USB mode for the same app, and plug my headphone into the Discovery board output, I see the correct frequencies on my scope.
Where/how do I get rid of 44.1 kHz in Native mode? I have tried everything I can think of.
3:54pm
Is your input from a File or Line In? If using a file as the input, then the sample rate of the input file is used (the default 'Bach Piano.mp3' is at 44100 Hz). To check, go to Layout -> Layout Properties in Designer and make sure the Source is Line In to use your microphone input.
To check the enumerated sample rates supported by your selected input and output audio devices, see <AWE Install Dir>\Bin\win32-vc100-rel\awelog.txt. If 48000 isn't listed for the audio devices you have selected, then 48 KHz isn't supported by the device.
Let us know if you still have issues after checking these items.
-Axel
4:36pm
I checked <AWE Install Dir>\Bin\win32-vc100-rel\awelog.txt and 48000 is a good sampling rate.
I tried my app in Native mode with File input and also with Line Input. With Line Input everything works correctly. With File input the sampling rate follows the Bach Piano sampling rate (as you suggested), despite the fact that the workspace still shows 48000, and despite the fact that all of my inputs are directed to null sinks. It is extremely weird that AW picks up the sampling rate of a default input file so invisibly. Surely the data below the input icon in the workspace should show 44100 in this case.
In any case, your several advices have given us a suitable workaround. Thank you for that.
5:05pm
Glad to hear you got it working.
FYI, the new edition of Designer (7.A.0.6) posted on our downloads page just a few minutes ago will in fact warn you about a mismatch between layout sample rate and input file sample rate.
5:08pm
That's great to know, Axel. Thank you so much for your very competent, and extremely efficient, support.