sox-users@lists.sourceforge.net unofficial mirror
 help / color / 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, back to index

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

sox-users@lists.sourceforge.net unofficial mirror

Archives are clonable: git clone --mirror https://public-inbox.org/sox-users

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.audio.sox
	nntp://ou63pmih66umazou.onion/inbox.comp.audio.sox
	nntp://news.gmane.org/gmane.comp.audio.sox

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox