File tree Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ Audio
102102- **flac ** - ``audio/x-flac ``
103103- **wav ** - ``audio/x-wav ``
104104- **amr ** - ``audio/amr ``
105+ - **aiff ** - ``audio/x-aiff ``
105106
106107Archive
107108^^^^^^^
Original file line number Diff line number Diff line change 5353 audio .Flac (),
5454 audio .Wav (),
5555 audio .Amr (),
56+ audio .Aiff (),
5657)
5758
5859# Supported font types
Original file line number Diff line number Diff line change @@ -185,3 +185,28 @@ def __init__(self):
185185 def match (self , buf ):
186186 return (buf [:2 ] == bytearray ([0xff , 0xf1 ]) or
187187 buf [:2 ] == bytearray ([0xff , 0xf9 ]))
188+
189+
190+ class Aiff (Type ):
191+ """
192+ Implements the AIFF audio type matcher.
193+ """
194+ MIME = 'audio/x-aiff'
195+ EXTENSION = 'aiff'
196+
197+ def __init__ (self ):
198+ super (Aiff , self ).__init__ (
199+ mime = Aiff .MIME ,
200+ extension = Aiff .EXTENSION
201+ )
202+
203+ def match (self , buf ):
204+ return (len (buf ) > 11 and
205+ buf [0 ] == 0x46 and
206+ buf [1 ] == 0x4F and
207+ buf [2 ] == 0x52 and
208+ buf [3 ] == 0x4D and
209+ buf [8 ] == 0x41 and
210+ buf [9 ] == 0x49 and
211+ buf [10 ] == 0x46 and
212+ buf [11 ] == 0x46 )
You can’t perform that action at this time.
0 commit comments