diff options
author | Erik de Castro Lopo <erikd@mega-nerd.com> | 2014-07-01 16:51:13 +1000 |
---|---|---|
committer | Erik de Castro Lopo <erikd@mega-nerd.com> | 2014-07-01 16:51:18 +1000 |
commit | 0319ecb91f39fe309d65938dbad3c5a295f42fb3 (patch) | |
tree | cec7852421dce5350fb3458201d9db4e042fedf6 | |
parent | 852d6e612a4d7838fb0c0ecba1f0e844d83481a8 (diff) |
Reorder file format lists to be the same as sndfile.h and api.html
* Reorders the list of recognized file formats and their filename
extensions and aliases in programs/common.c's format_map[] and in
sndfile-convert.1 so that the list is in the same order as in
sndfile.h and api.html
* Adds more types that we know but format_map[] didn't use, namely
AVR and WAVEX
* Add more filename extension aliases, insipred by those recognized
by SoX, namely "sph" for NIST and "prc" for WVE.
Patch-from: Jan Stary <hans@stare.cz>
-rw-r--r-- | man/sndfile-convert.1 | 64 | ||||
-rw-r--r-- | programs/common.c | 32 |
2 files changed, 55 insertions, 41 deletions
diff --git a/man/sndfile-convert.1 b/man/sndfile-convert.1 index 443d004..b53fdda 100644 --- a/man/sndfile-convert.1 +++ b/man/sndfile-convert.1 @@ -1,4 +1,4 @@ -.Dd "June 19, 2014" +.Dd "June 30, 2014" .Dt SNDFILE-CONVERT 1 .Os .Sh NAME @@ -16,61 +16,71 @@ converts sound files from one audio format to another. The output file is overwritten it it already exists. .Ss Formats The format of the output file is determined by the filename extension. -The following file formats are currently supported: +The following file formats are currently recognized: .Pp .Bl -tag -compact -width ircam -.It aif -AIFF (Apple/SGI) .It wav WAV (Microsoft) +.It aif +AIFF (Apple/SGI) .It au AU (Sun/NeXT) -.It caf -CAF (Apple Core Audio File) -.It flac -FLAC (FLAC Lossless Audio Codec) .It snd AU (Sun/NeXT) -.It svx -IFF (Amiga IFF/SVX8/SV16) -.It paf -PAF (Ensoniq PARIS) -.It fap -PAF (Ensoniq PARIS) +.It raw +RAW (header-less) .It gsm RAW (header-less) +.It vox +RAW (header-less) +.It paf +PAF (Ensoniq PARIS, big-endian) +.It fap +PAF (Ensoniq PARIS, little-endian) +.It svx +IFF (Amiga IFF/SVX8/SV16) .It nist -WAV (NIST Sphere) -.It htk -HTK (HMM Tool Kit) +SPHERE (NIST SPeech HEader Resources) +.It sph +SPHERE (NIST SPeech HEader Resources) +.It voc +VOC (Creative Labs) .It ircam SF (Berkeley/IRCAM/CARL) .It sf SF (Berkeley/IRCAM/CARL) -.It voc -VOC (Creative Labs) .It w64 W64 (SoundFoundry WAVE 64) -.It raw -RAW (header-less) +.It mat +MAT4 (GNU Octave 2.0 / Matlab 4.2) .It mat4 MAT4 (GNU Octave 2.0 / Matlab 4.2) .It mat5 MAT5 (GNU Octave 2.1 / Matlab 5.0) -.It mat -MAT4 (GNU Octave 2.0 / Matlab 4.2) .It pvf PVF (Portable Voice Format) +.It xi +XI (FastTracker 2) +.It htk +HTK (HMM Tool Kit) .It sds SDS (Midi Sample Dump Standard) +.It avr +AVR (Audio Visual Research) +.It wavex +WAVEX (MS WAVE with WAVEFORMATEX) .It sd2 SD2 (Sound Designer II) -.It vox -RAW (header-less) -.It xi -XI (FastTracker 2) +.It flac +FLAC (FLAC Lossless Audio Codec) +.It caf +CAF (Apple Core Audio File) .It wve WVE (Psion Series 3) +.It prc +WVE (Psion Series 3) +.It ogg +OGG (OGG Container format) .It oga OGG (OGG Container format) .It mpc diff --git a/programs/common.c b/programs/common.c index 2811536..c9b2578 100644 --- a/programs/common.c +++ b/programs/common.c @@ -1,5 +1,5 @@ /* -** Copyright (C) 1999-2013 Erik de Castro Lopo <erikd@mega-nerd.com> +** Copyright (C) 1999-2014 Erik de Castro Lopo <erikd@mega-nerd.com> ** Copyright (C) 2008 George Blood Audio ** ** All rights reserved. @@ -284,34 +284,38 @@ typedef struct static OUTPUT_FORMAT_MAP format_map [] = { - { "aif", 3, SF_FORMAT_AIFF }, { "wav", 0, SF_FORMAT_WAV }, + { "aif", 3, SF_FORMAT_AIFF }, { "au", 0, SF_FORMAT_AU }, - { "caf", 0, SF_FORMAT_CAF }, - { "flac", 0, SF_FORMAT_FLAC }, { "snd", 0, SF_FORMAT_AU }, - { "svx", 0, SF_FORMAT_SVX }, - { "paf", 0, SF_ENDIAN_BIG | SF_FORMAT_PAF }, - { "fap", 0, SF_ENDIAN_LITTLE | SF_FORMAT_PAF }, + { "raw", 0, SF_FORMAT_RAW }, { "gsm", 0, SF_FORMAT_RAW }, + { "vox", 0, SF_FORMAT_RAW }, + { "paf", 0, SF_FORMAT_PAF | SF_ENDIAN_BIG }, + { "fap", 0, SF_FORMAT_PAF | SF_ENDIAN_LITTLE }, + { "svx", 0, SF_FORMAT_SVX }, { "nist", 0, SF_FORMAT_NIST }, - { "htk", 0, SF_FORMAT_HTK }, + { "sph", 0, SF_FORMAT_NIST }, + { "voc", 0, SF_FORMAT_VOC }, { "ircam", 0, SF_FORMAT_IRCAM }, { "sf", 0, SF_FORMAT_IRCAM }, - { "voc", 0, SF_FORMAT_VOC }, { "w64", 0, SF_FORMAT_W64 }, - { "raw", 0, SF_FORMAT_RAW }, + { "mat", 0, SF_FORMAT_MAT4 }, { "mat4", 0, SF_FORMAT_MAT4 }, { "mat5", 0, SF_FORMAT_MAT5 }, - { "mat", 0, SF_FORMAT_MAT4 }, { "pvf", 0, SF_FORMAT_PVF }, + { "xi", 0, SF_FORMAT_XI }, + { "htk", 0, SF_FORMAT_HTK }, { "sds", 0, SF_FORMAT_SDS }, + { "avr", 0, SF_FORMAT_AVR }, + { "wavex", 0, SF_FORMAT_WAVEX }, { "sd2", 0, SF_FORMAT_SD2 }, - { "vox", 0, SF_FORMAT_RAW }, - { "xi", 0, SF_FORMAT_XI }, + { "flac", 0, SF_FORMAT_FLAC }, + { "caf", 0, SF_FORMAT_CAF }, { "wve", 0, SF_FORMAT_WVE }, - { "oga", 0, SF_FORMAT_OGG }, + { "prc", 0, SF_FORMAT_WVE }, { "ogg", 0, SF_FORMAT_OGG }, + { "oga", 0, SF_FORMAT_OGG }, { "mpc", 0, SF_FORMAT_MPC2K }, { "rf64", 0, SF_FORMAT_RF64 }, } ; /* format_map */ |