sox-users@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
* specifying format of RAW files
@ 2017-11-10 13:30 Jan Stary
  2017-11-10 14:04 ` Måns Rullgård
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Stary @ 2017-11-10 13:30 UTC (permalink / raw)
  To: sox-users

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?

(That would probably not make sense for self-describing formats:
$ play -c 1 -r 48000 -e float -b 32 pcm1.raw file.wav file.mp3 )

	Jan


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: specifying format of RAW files
  2017-11-10 13:30 specifying format of RAW files Jan Stary
@ 2017-11-10 14:04 ` Måns Rullgård
  2017-11-10 14:18   ` Måns Rullgård
  0 siblings, 1 reply; 3+ messages in thread
From: Måns Rullgård @ 2017-11-10 14:04 UTC (permalink / raw)
  To: sox-users

Jan Stary <hans@stare.cz> 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.

-- 
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
_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: specifying format of RAW files
  2017-11-10 14:04 ` Måns Rullgård
@ 2017-11-10 14:18   ` Måns Rullgård
  0 siblings, 0 replies; 3+ messages in thread
From: Måns Rullgård @ 2017-11-10 14:18 UTC (permalink / raw)
  To: sox-users

Måns Rullgård <mans@mansr.com> writes:

> Jan Stary <hans@stare.cz> 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
_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-11-10 14:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-10 13:30 specifying format of RAW files Jan Stary
2017-11-10 14:04 ` Måns Rullgård
2017-11-10 14:18   ` Måns Rullgård

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/sox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).