help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ubuntu soundsc and fourier transform


From: Mike Miller
Subject: Re: ubuntu soundsc and fourier transform
Date: Mon, 3 Aug 2015 10:13:28 -0400
User-agent: Mutt/1.5.23 (2014-03-12)

On Fri, Jul 31, 2015 at 18:42:51 +0200, Juan Pablo Carbajal wrote:
> I was trying to reproduce it. I do and get the same error as jordi.
> After I apply your solution (recompile with portaudio19-dev) I get
> 
> octave-gui:1> y=randn(1,1000);
> octave-gui:2> soundsc(y)
> ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
> ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
> ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
> ALSA lib pcm_route.c:947:(find_matching_chmap) Found no matching channel map
> bt_audio_service_open: connect() failed: Connection refused (111)
> bt_audio_service_open: connect() failed: Connection refused (111)
> bt_audio_service_open: connect() failed: Connection refused (111)
> bt_audio_service_open: connect() failed: Connection refused (111)

Well, 1000 samples is only 125 ms of audio :) Maybe it worked and you
didn't even notice. Try 8000 samples (default fs for soundsc is 8 kHz).

Unfortunately these warnings come out of the alsa libraries and there is
no way to block them being printed to stderr :( I see similar warnings
on my (working) system. They look like bad news, but it doesn't mean
something is broken. You'll probably always see these the first time you
call an audio function.

Btw, the "soundsc" function is a legacy compatibility wrapper around the
audioplayer class (but it is simpler to call). The "modern" way to do
sound in Octave (or Matlab) is:

  ## Upping the stakes, white noise in *stereo* at 16 kHz
  y = randn (16000, 2);
  player = audioplayer (y, 16000);
  play (player)
  player  ## just to see the properties available

Do any of these work for you?

-- 
mike



reply via email to

[Prev in Thread] Current Thread [Next in Thread]