# HG changeset patch # User Amine SEHILI # Date 1486292678 -3600 # Node ID fc95336aeb285a55da57a5e31094df6ed46a3244 # Parent 56ede0db2d19d38ce7f79ce7385b52b06af76a9a Add shortcut names for AudioSource properties diff -r 56ede0db2d19 -r fc95336aeb28 auditok/io.py --- 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(): """