mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
parecord: really fix recording OGG
432a91ed ("fix "Failed to open audio file" for FLAC and OGG)" claimed
to fix recording of OGG files with pacat, but it really fixed only
FLAC. This patch must be added on top to fix OGG, too.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/542>
This commit is contained in:
parent
468e3669aa
commit
1a73fb9eb9
1 changed files with 3 additions and 0 deletions
|
|
@ -1067,9 +1067,12 @@ int main(int argc, char *argv[]) {
|
||||||
* Endianness has been set in pa_sndfile_write_sample_spec(), but
|
* Endianness has been set in pa_sndfile_write_sample_spec(), but
|
||||||
* libsndfile errors out if endianness is set to anything other than
|
* libsndfile errors out if endianness is set to anything other than
|
||||||
* SF_ENDIAN_FILE for OGG or FLAC. Clear it.
|
* SF_ENDIAN_FILE for OGG or FLAC. Clear it.
|
||||||
|
* For OGG, libsndfile accepts only subformat SF_FORMAT_VORBIS.
|
||||||
*/
|
*/
|
||||||
if (file_format == SF_FORMAT_OGG || file_format == SF_FORMAT_FLAC)
|
if (file_format == SF_FORMAT_OGG || file_format == SF_FORMAT_FLAC)
|
||||||
sfi.format = (sfi.format & ~SF_FORMAT_ENDMASK) | SF_ENDIAN_FILE;
|
sfi.format = (sfi.format & ~SF_FORMAT_ENDMASK) | SF_ENDIAN_FILE;
|
||||||
|
if (file_format == SF_FORMAT_OGG)
|
||||||
|
sfi.format = (sfi.format & ~SF_FORMAT_SUBMASK) | SF_FORMAT_VORBIS;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue