Matlab is unable to detect the sampling frequency of Audio Interface

I have an ASIO audio interface. It is running at 48000Hz. When I check rate using playrec('getDevices'), I see the default sampling rate as 44100Hz. I tried changing the sampling frequency on the device, however Matlab reads the same 44100 Hz.
Is there any way to resolve this issue?

Answers (1)

One of the points of playrec, and other port audio interfaces, is to bypass the Microsoft Windows mixer. You need to set the sample rate with playrec, not with the Microsoft Windows mixer.

6 Comments

It is an ASIO not a windows MME.
The external audio interface has a local clock to itself that could be controlled by the device's control panel. The way port audio checks is it tries sending different sampling rates and tries to check if playrec is Initialized.
However, if you perform a playrec('getDevices') you should see a list of all devices with the default sampling rates.
When I do the same, irrespective of whatever sampling rate the device is at, Playrec shows 44100.
I think playrec, and other port audio interfaces, bypass ALL the mixer interfaces and access the device directly. I don't think you need to worry to much about what the interface is saying. Play a 1000 Hz tone with playrec at the desired sample rate and check it with an oscilloscope.
The problem is the default latency results from playrec. I have already tried recording the output using a loop back. It looks fine. I was just trying to find if there is an easy fix to this.
The reason for me to worry is that, with many other devices I do not see this behavior (Edirol UA 101, AudioFire12, Octa-capture) but, only see it for MOTU Ultralite MK3 Hybrid.
Thank you for all your help Daniel!
I hope there is a way out of this. Atleast I would like to know where the problem lies....
I am not sure if a loop back will let you validate the sample rate. I am pretty sure you need either a known signal or a known recording. If it is the start latency that you are worried about, I think the psychtoolbox port audio implementation is the lowest latency implementation that I have seen.
I am fine for now. But, I would like to know what is it that causes difference between MOTU and other Audio Interfaces. I shall keep the question open in case someone finds a similar issue.
Thank you very much, Daniel!

Sign in to comment.

Categories

Find more on Audio I/O and Waveform Generation in Help Center and File Exchange

Asked:

on 8 Dec 2011

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!