www.faq
, also at
http://www.boutell.com/faq/
/usr/demo/SOUND
directory/usr/demo/SOUND
contains demo programs
/usr/demo/SOUND/bin/soundtool
- another
Openwindows sound tool with a slightly different interface.
ptplay
to play sounds.
A quick and dirty ptplay script that uses aplay
is
The SDFPlay star runs the program "ptplay" in a separate background process. Unfortunately aplay is "sophisticated" enough to play more than one file at a time. So in the SDF:sound:speech" demo the two output files get played together. I tried adding the -f flag for aplay in the ptplay script (which forces aplay to wait until all the sound has been played before it returns) but that did not help. The reason is that ptplay is being invoked in *separate* processes. I don't know if we want to change SDFPlay to wait for ptplay to finish, but that seems like the only solution if we are going to allow something like aplay.
Also, it seems that the ptplay
program in Ptolemy0.6
has problems playing long files
ptplay
fails to play all of the following sample:
The ptplay program appears to be broken. If I run a demo that uses it, the ptplay program starts up but produces no audio. It chews up all my cpu cycles. When I kill it, then it finally produces audio.I wrote:
The sdf:sound:chirpplay demo works for me on campus. Perhaps there is some sort of problem with the audio on traveler, possibly due to the sleep resume stuff and the audio drivers. You could try: ptplay ~ptdesign/src/domains/sdf/demo/speech/sorrydave.au Also, '/usr/demo/SOUND/bin/soundtool' says that sorrydave.au is not a valid file, but then plays it anyway.Wan-teh wrote:
I remember that a "valid" .au file should have an ASCII header (possibly containing info like file name, file size, sampling rate). I think I read about it in a man page on audio. I just looked at some .au files in java's distribution. They all start with the header string ".snd ". The sorrydave.au file does not have a header. It only has the speech samples.Stephen wrote:
On my system at home, anyway, they're a little cagey about what the file format really is: DESCRIPTION Audio files contain a header that has a magic number (iden- tifying the file as an audio file) and fields that describe the encoding format used to store the audio data. Immedi- ately following the header is a variable-length information field in which, for instance, ASCII annotation may be stored. The Audio_hdr structure used by many of the libaudio rou- tines for describing audio data is not an exact duplicate of the audio file header. Several routines are provided to read and write file headers so that programs need not be concerned with the details of the exact file header struc- ture.Edward writes:
ptplay appears to not exit when it runs out of audio data. It just keeps running, like the Duracell bunny.I noticed this behaviour on my RDI as well.
audiotool
. It says Not an audio
file.
. soundtool
will play the output, but it
says that the file is not a valid audiofile, but it can be saved as one.