Re: specifying format of RAW files

Måns Rullgård <[email protected]>
Newsgroups gmane.comp.audio.sox
Message-ID <[email protected]>
Måns Rullgård <[email protected]> writes:

> Jan Stary <[email protected]> writes:
>
>> When playing RAW audio files, the specified format seems to
>> only take effect for the first file. Subsequent files fail
>> to play because of unspecified rate etc.
>>
>> $ play -c 1 -r 48000 -e float -b 32 pcm1.raw	# OK
>> $ play -c 1 -r 48000 -e float -b 32 pcm2.raw	# OK
>> $ play -c 1 -r 48000 -e float -b 32 pcm*.raw
>>   play FAIL formats: bad input format for file `pcm2.raw':
>>   sampling rate was not specified
>>
>> Is this intended, or should the specified format be used
>> for the subsequent files as well?
>
> This is intentional.  Format options apply to the following file only.
> Having them apply to a sequence of raw files could of course be useful,
> but I'm afraid this would require quite some work.  Remember that these
> same options will also override parameters in the file headers.

Oh, and something like this should work in your case:

$ play $(printf '-c 1 -r 48000 -e float -b 32 %s ' pcm*.raw)

-- 
Måns Rullgård

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.