help-octave
[Top][All Lists]
Advanced

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

Re: Simultaneous play/record of audio signals


From: Mike Miller
Subject: Re: Simultaneous play/record of audio signals
Date: Fri, 26 Aug 2016 10:48:43 -0700
User-agent: Mutt/1.6.2-neo (2016-07-23)

On Wed, Aug 24, 2016 at 01:13:10 -0700, mat wrote:
> 
> Hi,
> 
> I wrote some script to measure loudspeakers which generates a burst signal
> and sends and receives to a soundcard. I used to use Matlab with Pa-wavplay.
> I don't have access to Matlab anymore and am new to Octave, also I am a bit
> of a programming rookie....
> 
> Anyway, groping around in the dark, downloading Pa-wavplay, and port audio
> and trying to run the script doesn't work and I am struggling to find recent
> examples of other people doing this. The Pa-wavplay functionality I need is
> only a single line to do the I/O.
> 
> I've used the built in function 'audioplayer' to play the burst to my Asio
> device so the sound works, but I need simultaneous playing and recording for
> the measurement to work.

This should be possible, but I'm not aware of any examples that you can
just paste and run. Both audioplayer and audiorecorder in Octave allow
either synchronous or asynchronous play/record, so I think it should be
possible to do what you want.

  p = audioplayer (original, fs, ...)
  r = audiorecorder (fs, nbits, ...)
  play (p);
  recordblocking (r, number_of_seconds);
  y = getaudiodata (r);

-- 
mike



reply via email to

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