Clear Filters
Clear Filters

Problems with Matlab to capture samples on Digiducer 333D01 under Ubuntu 16

2 views (last 30 days)
I'm using Ubuntu version 16 and am trying to use Matlab functions to capture samples on the Digiducer accelerometer (333D01). I go to System Settings under the OS and select that device. I check under audiodevices that Matlab does recognize as ALSA device. However when I run the code below which "shaking" the device, I don't seem to be able to capture anything. I get some random fluctuations close to zero.
---------------------------------------------------------------------------- release(H); % Under SystemSettings->Sound->Input, under Record sound from: Microphone (333D01)
H = dsp.AudioRecorder('DeviceName', '333D01 10595173209464075160919: USB Audio (hw:2,0)', ...                       'SampleRate', 22050, ...                       'NumChannels', 1, ...                       'DeviceDataType', '16-bit integer', ...                                            'BufferSizeSource', 'Property', ...                       'BufferSize', 4096, ...                       'QueueDuration', 1.0, ...                       'SamplesPerFrame', 1024, ...                       'OutputDataType', 'double'); 
[SN, CalA, CalB, CalDate, version] = DigiDecoder(); CalA = CalA / 256;      % scaled for 16-bit values CalB = CalB / 256;      % scaled for 16-bit values
AUDIO = step(H); y = ((2^16)/(1*CalA)*AUDIO); -----------------------------------------------------------
when I call the AudioRecorder, I see the following error in my Linux command line
ALSA lib pcm_dsnoop.c:606:(snd_pcm_dsnoop_open) unable to open slave ALSA lib pcm_dmix.c:1029:(snd_pcm_dmix_open) unable to open slave ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib pcm_dmix.c:1029:(snd_pcm_dmix_open) unable to open slave

Answers (0)

Categories

Find more on Audio Plugin Creation and Hosting in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!