[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sound() in Octave
Re: sound() in Octave
Wed, 28 Nov 2012 18:47:30 -0800 (PST)
----- Original Message -----
> From: Sergei Steshenko <address@hidden>
> To: Jordi Gutiérrez Hermoso <address@hidden>; Francesco Potortì
> Cc: "address@hidden" <address@hidden>
> Sent: Thursday, November 29, 2012 4:02 AM
> Subject: Re: sound() in Octave
> ----- Original Message -----
>> From: Jordi Gutiérrez Hermoso <address@hidden>
>> To: Francesco Potortì <address@hidden>
>> Cc: address@hidden
>> Sent: Wednesday, November 28, 2012 11:59 PM
>> Subject: Re: sound() in Octave
>> On 28 November 2012 16:55, Jordi Gutiérrez Hermoso
>>> On 28 November 2012 16:51, Francesco Potortì
>>>>> Sound in Octave does not work unless you have an old Linux
>>>>> installation that allows you to directly write to /dev/dsp. It
>>>>> easier to use wavwrite to save your sound files and play them
>>>>> external program.
>>>> I see this on my system:
>>>> $ ls -l /dev/dsp
>>>> crw-rw---T+ 1 root audio 14, 3 Sep 26 16:16 /dev/dsp
>>> Yeah, but /dev/dsp doesn't even exist unless you're using OSS
>>> some compatibility enabled for it.
>> Oh, not to mention, you also have to make sure nothing else is using
>> /dev/dsp, e.g. no desktop system or alternative audio system. All in
>> all, the current Octave method for playing sound requires the planets
>> to be perfectly aligned up to 8 significant figures and we really need
>> something far more portable. Compatibility layers such as portaudio or
>> SDL seem like the possible options.
>> - Jordi G. H.
>> Help-octave mailing list
> Or writing scripts that call, for example, 'sox' (sox.sf.net), and
> 'sox' exists for all major OSes.
> I am using 'sox' for capture and 'aplay' for playback for that
> matter, but I'm on Linux. I can replace 'aplay' with 'sox'
> if I want.
> Just making a _data_ interface to audio subsystem isn't all - from time to
> time underruns/overruns happen, and they have to be taken care of.
> Help-octave mailing list
Oh, and if one thinks of using an external program with Octave (or any other
program capable of opening files) named pipes (
https://en.wikipedia.org/wiki/Named_pipe ) are quite handy. Of course, on
Windows there are some idiosyncrasies (
https://en.wikipedia.org/wiki/Named_pipe#In_Windows ), but still usable.
Re: sound() in Octave, Hugo Coolens, 2012/11/28