wav-file 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
File without changes
@@ -1,3 +1,7 @@
1
+ === 0.0.3 2011-06-23
2
+
3
+ * works on Ruby1.9.2
4
+
1
5
  === 0.0.2 2010-11-17
2
6
 
3
7
  * bug fix
@@ -4,9 +4,20 @@
4
4
 
5
5
  == DESCRIPTION:
6
6
 
7
- Read wav file format and Edit data chunk
7
+ Read wav file format and Edit data chunk.
8
8
 
9
9
 
10
+ == ENVIRONMENT:
11
+
12
+ * Ruby 1.8.7
13
+ * Ruby 1.9.2
14
+ * JRuby 1.6.0
15
+
16
+
17
+ == INSTALL:
18
+
19
+ * gem install wav-file
20
+
10
21
  == TIPS:
11
22
 
12
23
  To run samples, you need wav file.
@@ -59,11 +70,6 @@ Save to file
59
70
 
60
71
  See "samples" directory.
61
72
 
62
-
63
- == INSTALL:
64
-
65
- * gem install wav-file
66
-
67
73
  == LICENSE:
68
74
 
69
75
  (The MIT License)
@@ -1,5 +1,5 @@
1
1
  require File.dirname(__FILE__)+'/wav-file/wav-file.rb'
2
2
 
3
3
  module WavFile
4
- VERSION = '0.0.2'
4
+ VERSION = '0.0.3'
5
5
  end
@@ -24,12 +24,12 @@ module WavFile
24
24
  def initialize(chunk)
25
25
  return if chunk.class != Chunk
26
26
  return if chunk.name != 'fmt '
27
- @id = chunk.data.slice(0,2)[0].to_i
28
- @channel = chunk.data.slice(2,2)[0].to_i
27
+ @id = chunk.data.slice(0,2).unpack('c')[0]
28
+ @channel = chunk.data.slice(2,2).unpack('c')[0]
29
29
  @hz = chunk.data.slice(4,4).unpack('V').join.to_i
30
30
  @bytePerSec = chunk.data.slice(8,4).unpack('V').join.to_i
31
- @blockSize = chunk.data.slice(12,2)[0].to_i
32
- @bitPerSample = chunk.data.slice(14,2)[0].to_i
31
+ @blockSize = chunk.data.slice(12,2).unpack('c')[0]
32
+ @bitPerSample = chunk.data.slice(14,2).unpack('c')[0]
33
33
  end
34
34
 
35
35
  def to_s
@@ -18,8 +18,7 @@ ARGV.each{|f|
18
18
  format = WavFile::readFormat open(f)
19
19
  if format != base_format
20
20
  puts `ffmpeg -i #{f} -ac #{base_format.channel} -ar #{base_format.hz} fixed_#{f}`
21
+ else
22
+ puts "#{f} is ok"
21
23
  end
22
24
  }
23
-
24
-
25
-
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wav-file
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
5
- prerelease: false
4
+ hash: 25
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sho Hashimoto
@@ -15,42 +15,26 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-18 00:00:00 +09:00
18
+ date: 2011-06-23 00:00:00 +09:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
- name: rubyforge
22
+ name: hoe
23
23
  prerelease: false
24
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
25
  none: false
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- hash: 7
29
+ hash: 35
30
30
  segments:
31
31
  - 2
32
- - 0
32
+ - 9
33
33
  - 4
34
- version: 2.0.4
34
+ version: 2.9.4
35
35
  type: :development
36
36
  version_requirements: *id001
37
- - !ruby/object:Gem::Dependency
38
- name: hoe
39
- prerelease: false
40
- requirement: &id002 !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ">="
44
- - !ruby/object:Gem::Version
45
- hash: 19
46
- segments:
47
- - 2
48
- - 7
49
- - 0
50
- version: 2.7.0
51
- type: :development
52
- version_requirements: *id002
53
- description: Read wav file format and Edit data chunk
37
+ description: Read wav file format and Edit data chunk.
54
38
  email:
55
39
  - hashimoto@shokai.org
56
40
  executables: []
@@ -87,6 +71,7 @@ files:
87
71
  - samples/maximize_volume.rb
88
72
  - samples/composite.rb
89
73
  - samples/read_format.rb
74
+ - .gemtest
90
75
  has_rdoc: true
91
76
  homepage: http://github.com/shokai/ruby-wav-file
92
77
  licenses: []
@@ -118,9 +103,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
103
  requirements: []
119
104
 
120
105
  rubyforge_project: wav-file
121
- rubygems_version: 1.3.7
106
+ rubygems_version: 1.6.2
122
107
  signing_key:
123
108
  specification_version: 3
124
- summary: Read wav file format and Edit data chunk
109
+ summary: Read wav file format and Edit data chunk.
125
110
  test_files: []
126
111