nu_wav 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8c30891ab0c891a3979c1941e18e9c12a1bbd440
4
- data.tar.gz: 96f2fc0f82f3fcd1bb82b8fa4a88292e2bbb1da4
3
+ metadata.gz: ff90bfdab63fd49f4fde0dda4e2b22c812f63378
4
+ data.tar.gz: 867412a86abddeb99d36917caeea201292e5538b
5
5
  SHA512:
6
- metadata.gz: 877cb25d33a3679a51a2f7c229628536b7696efeb1385639af751b82b05c11a2fca5e443cddd5217d12c6f287261c6e81212cf8d112b70cb4e7849439ab472e2
7
- data.tar.gz: ebc5112bf96fee32b4851cd0e1c09a1ea3fe65dda6c5b87aed483bdd7579fc8d8366920136e9b0162e2919ed0fb78611479a3e2d9d6dd9c442e95f35ef358063
6
+ metadata.gz: b63dfd82faae5b350baf485bde9990aa8243b3cecfb8d487d5ae9f9e3a0bc5dfec3d51dd9c42f2b711d31b682ef429830cc887d1fa30fe109c4ff418cc0daf12
7
+ data.tar.gz: fd7f2c65df980c45722918afb2302b43fc70eacc6e78a05ecab049f6394e3fbade417c03d08015db8c6b93511715cdaa17886dff7347fb079b30169a90c9e33c
@@ -1,6 +1,6 @@
1
1
  module NuWav
2
2
  class Chunk
3
- attr_accessor :id, :size, :raw
3
+ attr_accessor :id, :size, :raw, :pad_byte
4
4
 
5
5
  def self.parse(id, size, file)
6
6
  raw = file.read(size)
@@ -1,3 +1,3 @@
1
1
  module NuWav
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
@@ -58,7 +58,10 @@ module NuWav
58
58
  pad = f.read(1)
59
59
  if (pad.nil? || pad.ord != 0)
60
60
  NuWav::WaveFile.log("NOT PADDED")
61
+ self.chunks[chunk_name.to_sym].pad_byte = false
61
62
  f.seek(fpos + parsed_chunk_size)
63
+ else
64
+ self.chunks[chunk_name.to_sym].pad_byte = true
62
65
  end
63
66
  end
64
67
 
@@ -107,12 +107,16 @@ class TestNuWav < Test::Unit::TestCase
107
107
  w.to_file('test_no_pad.wav')
108
108
  assert File.exists?('test_no_pad.wav')
109
109
  assert_equal File.size('test_no_pad.wav'), 962226
110
+ nw = WaveFile.parse('test_no_pad.wav')
111
+ assert nw.chunks[:data].pad_byte
110
112
  File.delete('test_no_pad.wav')
111
113
 
112
114
  File.delete('test_no_pad.wav') rescue nil
113
115
  w.to_file('test_no_pad.wav', {:no_pad_byte=>true})
114
116
  assert File.exists?('test_no_pad.wav')
115
117
  assert_equal File.size('test_no_pad.wav'), 962225
118
+ nw = WaveFile.parse('test_no_pad.wav')
119
+ assert !nw.chunks[:data].pad_byte
116
120
  File.delete('test_no_pad.wav')
117
121
  end
118
122
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nu_wav
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kuklewicz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-03 00:00:00.000000000 Z
11
+ date: 2014-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-mp3info