Created
January 27, 2012 21:56
-
-
Save andrewgdunn/1691149 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@property | |
def samplerate(self): | |
if hasattr(self.mgfile.info, 'sample_rate'): | |
# Reasonably sure from checking documentation that all formats | |
# have this available. | |
return self.mgfile.info.sample_rate | |
else: | |
# Return and empty string, _if_ this ever happens | |
return '' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment