forked from snacksndfileext/SnackSndfileExt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsnack_sndfile_ext.tcl.in
103 lines (96 loc) · 3.54 KB
/
snack_sndfile_ext.tcl.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# snack_sndfile_ext.tcl tcl part of Giulio Paci's SnackSndfileExt
#
# Copyright (C) 2012 Giampiero Salvi <[email protected]>
#
# This file adds the snack magic to make the formats provided by the
# snack_sndfile_ext extension available.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
# --------------------------------------------------------------------
package provide @PACKAGE@ @VERSION@
package require snack
# The lists of formats are based on libsndfile version 1.0.25. Optimally this
# information should be generated automatically, for example with code similar
# to the one in examples/list_formats.c (in the libsndfile distribution).
namespace eval snack::snack_sndfile_ext {
variable extTypes
variable loadTypes
variable loadKeys
set extTypesMC {
{{AIFF (Apple/SGI)} .aiff}
{{AU (Sun/NeXT)} .au}
{{AVR (Audio Visual Research)} .avr}
{{CAF (Apple Core Audio File)} .caf}
{{FLAC (FLAC Lossless Audio Codec)} .flac}
{{HTK (HMM Tool Kit)} .htk}
{{IFF (Amiga IFF/SVX8/SV16)} .iff}
{{MAT4 (GNU Octave 2.0 / Matlab 4.2)} .mat}
{{MAT5 (GNU Octave 2.1 / Matlab 5.0)} .mat}
{{MPC (Akai MPC 2k)} .mpc}
{{OGG (OGG Container format)} .oga}
{{PAF (Ensoniq PARIS)} .paf}
{{PVF (Portable Voice Format)} .pvf}
{{RAW (header-less)} .raw}
{{RF64 (RIFF 64)} .rf64}
{{SD2 (Sound Designer II)} .sd2}
{{SDS (Midi Sample Dump Standard)} .sds}
{{SF (Berkeley/IRCAM/CARL)} .sf}
{{VOC (Creative Labs)} .voc}
{{W64 (SoundFoundry WAVE 64)} .w64}
{{WAV (Microsoft)} .wav}
{{WAV (NIST Sphere)} .wav}
{{WAVEX (Microsoft)} .wav}
{{WVE (Psion Series 3)} .wve}
{{XI (FastTracker 2)} .xi}
}
set loadTypes {
{{AIFF (Apple/SGI)} {.aiff .AIFF}}
{{AU (Sun/NeXT)} {.au .AU}}
{{AVR (Audio Visual Research)} {.avr .AVR}}
{{CAF (Apple Core Audio File)} {.caf .CAF}}
{{FLAC (FLAC Lossless Audio Codec)} {.flac .FLAC}}
{{HTK (HMM Tool Kit)} {.htk .HTK}}
{{IFF (Amiga IFF/SVX8/SV16)} {.iff .IFF}}
{{MAT4 (GNU Octave 2.0 / Matlab 4.2)} {.mat .MAT}}
{{MAT5 (GNU Octave 2.1 / Matlab 5.0)} {.mat .MAT}}
{{MPC (Akai MPC 2k)} {.mpc .MPC}}
{{OGG (OGG Container format)} {.oga .OGA}}
{{PAF (Ensoniq PARIS)} {.paf .PAF}}
{{PVF (Portable Voice Format)} {.pvf .PVF}}
{{RAW (header-less)} {.raw .RAW}}
{{RF64 (RIFF 64)} {.rf64 .RF64}}
{{SD2 (Sound Designer II)} {.sd2 .SD2}}
{{SDS (Midi Sample Dump Standard)} {.sds .SDS}}
{{SF (Berkeley/IRCAM/CARL)} {.sf .SF}}
{{VOC (Creative Labs)} {.voc .VOC}}
{{W64 (SoundFoundry WAVE 64)} {.w64 .W64}}
{{WAV (Microsoft)} {.wav .WAV}}
{{WAV (NIST Sphere)} {.wav .WAV}}
{{WAVEX (Microsoft)} {.wav .WAV}}
{{WVE (Psion Series 3)} {.wve .WVE}}
{{XI (FastTracker 2)} {.xi .XI}}
}
set extTypes [list]
set loadKeys [list]
foreach pair $extTypesMC {
set type [string toupper [lindex $pair 0]]
set ext [lindex $pair 1]
lappend extTypes [list $type $ext]
lappend loadKeys $type
}
snack::addLoadTypes $loadTypes $loadKeys
snack::addExtTypes $extTypes
}