Showing the changes to python (1 of 1 file). Show all
Unified · Split
| @@ -42,8 +42,9 @@ class sndfile: · 41 unmodified lines | |||
| 42 | self.file = new_aubio_sndfile_wo(model.file,filename) | 42 | self.file = new_aubio_sndfile_wo(model.file,filename) |
| 43 | else: | 43 | else: |
| 44 | self.file = new_aubio_sndfile_ro(filename) | 44 | self.file = new_aubio_sndfile_ro(filename) |
| 45 | if self.file == None: raise(ValueError, "failed opening file") | ||
| 45 | def __del__(self): | 46 | def __del__(self): |
| 46 | del_aubio_sndfile(self.file) | 47 | if self.file != None: del_aubio_sndfile(self.file) |
| 47 | def info(self): | 48 | def info(self): |
| 48 | aubio_sndfile_info(self.file) | 49 | aubio_sndfile_info(self.file) |
| 49 | def samplerate(self): | 50 | def samplerate(self): |