File tree Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -143,6 +143,7 @@ assert_eq!(kind.extension(), "foo");
143
143
- ** wav** - ` audio/x-wav `
144
144
- ** amr** - ` audio/amr `
145
145
- ** aac** - ` audio/aac `
146
+ - ** aiff** - ` audio/x-aiff `
146
147
147
148
#### Archive
148
149
Original file line number Diff line number Diff line change @@ -295,6 +295,12 @@ matcher_map!(
295
295
"aac" ,
296
296
matchers:: audio:: is_aac
297
297
) ,
298
+ (
299
+ MatcherType :: Audio ,
300
+ "audio/x-aiff" ,
301
+ "aiff" ,
302
+ matchers:: audio:: is_aiff
303
+ ) ,
298
304
// Font
299
305
(
300
306
MatcherType :: Font ,
Original file line number Diff line number Diff line change @@ -62,3 +62,16 @@ pub fn is_amr(buf: &[u8]) -> bool {
62
62
pub fn is_aac ( buf : & [ u8 ] ) -> bool {
63
63
buf. len ( ) > 1 && buf[ 0 ] == 0xFF && ( buf[ 1 ] == 0xF1 || buf[ 1 ] == 0xF9 )
64
64
}
65
+
66
+ /// Returns whether a buffer is AIFF data.
67
+ pub fn is_aiff ( buf : & [ u8 ] ) -> bool {
68
+ buf. len ( ) > 11
69
+ && buf[ 0 ] == 0x46
70
+ && buf[ 1 ] == 0x4F
71
+ && buf[ 2 ] == 0x52
72
+ && buf[ 3 ] == 0x4D
73
+ && buf[ 8 ] == 0x41
74
+ && buf[ 9 ] == 0x49
75
+ && buf[ 10 ] == 0x46
76
+ && buf[ 11 ] == 0x46
77
+ }
You can’t perform that action at this time.
0 commit comments