Hello community,

here is the log from the commit of package python-pydub for openSUSE:Factory 
checked in at 2018-11-01 14:37:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pydub (Old)
 and      /work/SRC/openSUSE:Factory/.python-pydub.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pydub"

Thu Nov  1 14:37:55 2018 rev:3 rq:645719 version:0.23.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pydub/python-pydub.changes        
2018-07-17 09:43:33.637034268 +0200
+++ /work/SRC/openSUSE:Factory/.python-pydub.new/python-pydub.changes   
2018-11-01 14:38:06.702915131 +0100
@@ -1,0 +2,13 @@
+Wed Oct 31 11:26:43 UTC 2018 - Jan Engelhardt <[email protected]>
+
+- Use noun phrase.
+
+-------------------------------------------------------------------
+Wed Oct 31 04:48:36 UTC 2018 - Todd R <[email protected]>
+
+- Update to 0.23.0
+  * Add support for playback via simpleaudio
+  * Allow users to override the type in 
pydub.AudioSegment().get_array_of_samples() (PR #313)
+  * Fix a bug where the wrong codec was used for 8-bit audio (PR #309 - issue 
#308)
+
+-------------------------------------------------------------------

Old:
----
  pydub-0.22.1.tar.gz

New:
----
  pydub-0.23.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-pydub.spec ++++++
--- /var/tmp/diff_new_pack.COuhOJ/_old  2018-11-01 14:38:08.094914994 +0100
+++ /var/tmp/diff_new_pack.COuhOJ/_new  2018-11-01 14:38:08.098914993 +0100
@@ -12,7 +12,7 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
@@ -20,9 +20,9 @@
 # Test data missing
 %bcond_with     test
 Name:           python-pydub
-Version:        0.22.1
+Version:        0.23.0
 Release:        0
-Summary:        Manipulate audio with Python
+Summary:        Audio manipulation with Python
 License:        MIT
 Group:          Development/Languages/Python
 Url:            https://github.com/jiaaro/pydub
@@ -37,13 +37,14 @@
 BuildRequires:  ffmpeg
 %endif
 Recommends:     python-scipy
+Recommends:     python-simpleaudio
 Requires:       ffmpeg
 BuildArch:      noarch
 
 %python_subpackages
 
 %description
-Manipulate audio with a high level interface.
+A Python module to manipulate audio with a high level interface.
 
 %prep
 %setup -q -n pydub-%{version}
@@ -64,7 +65,6 @@
 %endif
 
 %files %{python_files}
-%defattr(-,root,root,-)
 %license LICENSE
 %{python_sitelib}/*
 

++++++ pydub-0.22.1.tar.gz -> pydub-0.23.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pydub-0.22.1/PKG-INFO new/pydub-0.23.0/PKG-INFO
--- old/pydub-0.22.1/PKG-INFO   2018-06-16 00:47:27.000000000 +0200
+++ new/pydub-0.23.0/PKG-INFO   2018-09-17 22:28:42.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pydub
-Version: 0.22.1
+Version: 0.23.0
 Summary: Manipulate audio with an simple and easy high level interface
 Home-page: http://pydub.com
 Author: James Robert
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pydub-0.22.1/pydub/audio_segment.py 
new/pydub-0.23.0/pydub/audio_segment.py
--- old/pydub-0.22.1/pydub/audio_segment.py     2018-06-16 00:46:47.000000000 
+0200
+++ new/pydub-0.23.0/pydub/audio_segment.py     2018-09-17 22:24:40.000000000 
+0200
@@ -257,11 +257,13 @@
         """
         return self._data
 
-    def get_array_of_samples(self):
+    def get_array_of_samples(self, array_type_override=None):
         """
         returns the raw_data as an array of samples
         """
-        return array.array(self.array_type, self._data)
+        if array_type_override is None:
+            array_type_override = self.array_type
+        return array.array(array_type_override, self._data)
 
     @property
     def array_type(self):
@@ -279,6 +281,9 @@
         except:
             return False
 
+    def __hash__(self):
+       return hash(AudioSegment) ^ hash((self.channels, self.frame_rate, 
self.sample_width, self._data))
+
     def __ne__(self, other):
         return not (self == other)
 
@@ -669,7 +674,11 @@
                 bits_per_sample = 16
             else:
                 bits_per_sample = audio_streams[0]['bits_per_sample']
-            acodec = 'pcm_s%dle' % bits_per_sample
+            if bits_per_sample == 8:
+                acodec = 'pcm_s8'
+            else:
+                acodec = 'pcm_s%dle' % bits_per_sample
+
             conversion_command += ["-acodec", acodec]
 
         conversion_command += [
@@ -845,7 +854,7 @@
                         "-id3v2_version", id3v2_version
                     ])
 
-        if sys.platform == 'darwin':
+        if sys.platform == 'darwin' and codec == 'mp3':
             conversion_command.extend(["-write_xing", "0"])
 
         conversion_command.extend([
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pydub-0.22.1/pydub/generators.py 
new/pydub-0.23.0/pydub/generators.py
--- old/pydub-0.22.1/pydub/generators.py        2017-08-05 17:32:05.000000000 
+0200
+++ new/pydub-0.23.0/pydub/generators.py        2018-08-31 20:59:56.000000000 
+0200
@@ -1,7 +1,7 @@
 """
 Each generator will return float samples from -1.0 to 1.0, which can be 
 converted to actual audio with 8, 16, 24, or 32 bit depth using the
-AudioSegment.from_generator class method.
+SiganlGenerator.to_audio_segment() method (on any of it's subclasses).
 
 See Wikipedia's "waveform" page for info on some of the generators included 
 here: http://en.wikipedia.org/wiki/Waveform
@@ -139,4 +139,4 @@
 class WhiteNoise(SignalGenerator):
     def generate(self):
         while True:
-            yield (random.random() * 2) - 1.0
\ No newline at end of file
+            yield (random.random() * 2) - 1.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pydub-0.22.1/pydub/playback.py 
new/pydub-0.23.0/pydub/playback.py
--- old/pydub-0.22.1/pydub/playback.py  2017-08-05 17:36:14.000000000 +0200
+++ new/pydub-0.23.0/pydub/playback.py  2018-09-17 22:24:40.000000000 +0200
@@ -38,9 +38,34 @@
     p.terminate()
 
 
+def _play_with_simpleaudio(seg):
+    import simpleaudio
+    return simpleaudio.play_buffer(
+        seg.raw_data, 
+        num_channels=seg.channels, 
+        bytes_per_sample=seg.sample_width, 
+        sample_rate=seg.frame_rate
+    )
+
+
 def play(audio_segment):
     try:
-        import pyaudio
+        playback = _play_with_simpleaudio(audio_segment)
+        try:
+            playback.wait_done()
+        except KeyboardInterrupt:
+            playback.stop()
+    except ImportError:
+        pass
+    else:
+        return
+    
+    try:
         _play_with_pyaudio(audio_segment)
+        return
     except ImportError:
-        _play_with_ffplay(audio_segment)
+        pass
+    else:
+        return
+    
+    _play_with_ffplay(audio_segment)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pydub-0.22.1/pydub.egg-info/PKG-INFO 
new/pydub-0.23.0/pydub.egg-info/PKG-INFO
--- old/pydub-0.22.1/pydub.egg-info/PKG-INFO    2018-06-16 00:47:27.000000000 
+0200
+++ new/pydub-0.23.0/pydub.egg-info/PKG-INFO    2018-09-17 22:28:42.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pydub
-Version: 0.22.1
+Version: 0.23.0
 Summary: Manipulate audio with an simple and easy high level interface
 Home-page: http://pydub.com
 Author: James Robert
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pydub-0.22.1/setup.py new/pydub-0.23.0/setup.py
--- old/pydub-0.22.1/setup.py   2018-06-16 00:44:56.000000000 +0200
+++ new/pydub-0.23.0/setup.py   2018-09-17 22:24:54.000000000 +0200
@@ -8,7 +8,7 @@
 
 setup(
     name='pydub',
-    version='0.22.1',
+    version='0.23.0',
     author='James Robert',
     author_email='[email protected]',
     description='Manipulate audio with an simple and easy high level 
interface',


Reply via email to