changeset 72:fc95336aeb28

Add shortcut names for AudioSource properties
author Amine SEHILI <amine.sehili@gmail.com>
date Sun, 05 Feb 2017 12:04:38 +0100
parents 56ede0db2d19
children 60854b74ee5d
files auditok/io.py
diffstat 1 files changed, 15 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/auditok/io.py	Sun Feb 05 11:59:00 2017 +0100
+++ b/auditok/io.py	Sun Feb 05 12:04:38 2017 +0100
@@ -113,6 +113,11 @@
         """ Number of samples per second of audio stream """
         return self._sampling_rate
 
+    @property
+    def sr(self):
+        """ Number of samples per second of audio stream """
+        return self._sampling_rate
+
     def get_sample_width(self):
         """ Return the number of bytes used to represent one audio sample """
         return self.sample_width
@@ -122,6 +127,11 @@
         """ Number of bytes used to represent one audio sample """
         return self._sample_width
 
+    @property
+    def sw(self):
+        """ Number of bytes used to represent one audio sample """
+        return self._sample_width
+
     def get_channels(self):
         """ Return the number of channels of this audio source """
         return self.channels
@@ -131,6 +141,11 @@
         """ Number of channels of this audio source """
         return self._channels
 
+    @property
+    def ch(self):
+        """ Return the number of channels of this audio source """
+        return self.channels
+
 
 class Rewindable():
     """