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.
- data/.gemtest +0 -0
- data/History.txt +4 -0
- data/README.rdoc +12 -6
- data/lib/wav-file.rb +1 -1
- data/lib/wav-file/wav-file.rb +4 -4
- data/samples/adjust_wav_format.rb +2 -3
- metadata +13 -28
data/.gemtest
ADDED
File without changes
|
data/History.txt
CHANGED
data/README.rdoc
CHANGED
@@ -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)
|
data/lib/wav-file.rb
CHANGED
data/lib/wav-file/wav-file.rb
CHANGED
@@ -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]
|
28
|
-
@channel = chunk.data.slice(2,2)[0]
|
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]
|
32
|
-
@bitPerSample = chunk.data.slice(14,2)[0]
|
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
|
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:
|
5
|
-
prerelease:
|
4
|
+
hash: 25
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
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:
|
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:
|
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:
|
29
|
+
hash: 35
|
30
30
|
segments:
|
31
31
|
- 2
|
32
|
-
-
|
32
|
+
- 9
|
33
33
|
- 4
|
34
|
-
version: 2.
|
34
|
+
version: 2.9.4
|
35
35
|
type: :development
|
36
36
|
version_requirements: *id001
|
37
|
-
|
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.
|
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
|
|