Recognize sound headers.
(filename)
| 60 | |
| 61 | |
| 62 | def whathdr(filename): |
| 63 | """Recognize sound headers.""" |
| 64 | with open(filename, 'rb') as f: |
| 65 | h = f.read(512) |
| 66 | for tf in tests: |
| 67 | res = tf(h, f) |
| 68 | if res: |
| 69 | return SndHeaders(*res) |
| 70 | return None |
| 71 | |
| 72 | |
| 73 | #-----------------------------------# |