[DRE-commits] [ruby-wavefile] 01/02: use little-endian pack codes (https://github.com/jstrait/wavefile/pull/18)
Hanno Zulla
hanno-guest at moszumanska.debian.org
Fri Feb 26 14:20:12 UTC 2016
This is an automated email from the git hooks/post-receive script.
hanno-guest pushed a commit to branch master
in repository ruby-wavefile.
commit 09b939eae447b23d6ff3f31d306be1fa4c7d4e6e
Author: Hanno Zulla <hanno.zulla at epublica.de>
Date: Fri Feb 26 15:17:10 2016 +0100
use little-endian pack codes
(https://github.com/jstrait/wavefile/pull/18)
---
debian/patches/01-big-endian.patch | 35 +++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 36 insertions(+)
diff --git a/debian/patches/01-big-endian.patch b/debian/patches/01-big-endian.patch
new file mode 100644
index 0000000..fbec4f7
--- /dev/null
+++ b/debian/patches/01-big-endian.patch
@@ -0,0 +1,35 @@
+Description: use little-endian pack codes
+ The wavefile gem is using "native endian" pack codes where "little
+ endian" need to be specified for RIFF files. This patch makes sure
+ that the wavefile gem works correctly on big-endian hardware.
+ <URL: https://github.com/jstrait/wavefile/pull/18>.
+Forwarded: yes
+Author: Hanno Zulla <kontakt at hanno.de>
+Last-Update: 2016-02-26
+
+Index: ruby-wavefile/lib/wavefile.rb
+===================================================================
+--- ruby-wavefile.orig/lib/wavefile.rb 2016-02-26 15:06:57.010860717 +0100
++++ ruby-wavefile/lib/wavefile.rb 2016-02-26 15:12:55.094391776 +0100
+@@ -25,7 +25,7 @@
+ :sample => "smpl",
+ :instrument => "inst" } # :nodoc:
+
+- PACK_CODES = {:pcm => {8 => "C*", 16 => "s*", 24 => "C*", 32 => "l*"},
++ PACK_CODES = {:pcm => {8 => "C*", 16 => "s<*", 24 => "C*", 32 => "l<*"},
+ :float => { 32 => "e*", 64 => "E*"}} # :nodoc:
+
+ UNSIGNED_INT_16 = "v" # :nodoc:
+Index: ruby-wavefile/lib/wavefile/writer.rb
+===================================================================
+--- ruby-wavefile.orig/lib/wavefile/writer.rb 2016-02-26 15:06:57.010860717 +0100
++++ ruby-wavefile/lib/wavefile/writer.rb 2016-02-26 15:13:03.438380850 +0100
+@@ -76,7 +76,7 @@
+
+ if @format.bits_per_sample == 24 && @format.sample_format == :pcm
+ samples.flatten.each do |sample|
+- @file.syswrite([sample].pack("lX"))
++ @file.syswrite([sample].pack("l<X"))
+ end
+ else
+ @file.syswrite(samples.flatten.pack(@pack_code))
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..8fcba7f
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+01-big-endian.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-wavefile.git
More information about the Pkg-ruby-extras-commits
mailing list