wahwah 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wahwah/mp4_tag.rb +13 -0
- data/lib/wahwah/riff_tag.rb +9 -8
- data/lib/wahwah/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c89f381ce92eb4aef78be550c4d94ab8240aca8eb73668a3665ab4a13b1b4a05
|
4
|
+
data.tar.gz: f96620760e75d4675540394e6a09699872b882e9472b609ca9fa89461718bb2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa56fddf36105d9ffe48174a448242c48e89473316d469589cfcfd6bd89dfa014b78a2ffac3b7b65cf0ff4afa75eb53ccb1114196f621828fecec4960f64ac36
|
7
|
+
data.tar.gz: a096bd36dd4a29d180faa55b6a06e4fbcb3ada6beb1592f37c15dfab84744c7f4850b5810620cc22909b76c30f75594a055eb11a55dec760c09c5a70c650332c
|
data/lib/wahwah/mp4_tag.rb
CHANGED
@@ -125,9 +125,22 @@ module WahWah
|
|
125
125
|
|
126
126
|
mp4a_atom = atom.find("mp4a")
|
127
127
|
esds_atom = atom.find("esds")
|
128
|
+
alac_atom = atom.find("alac")
|
128
129
|
|
129
130
|
@sample_rate = mp4a_atom.data.unpack1("x22I>") if mp4a_atom.valid?
|
130
131
|
@bitrate = esds_atom.data.unpack1("x26I>") / 1000 if esds_atom.valid?
|
132
|
+
|
133
|
+
# see https://github.com/macosforge/alac/blob/master/ALACMagicCookieDescription.txt for more info.
|
134
|
+
if alac_atom.valid?
|
135
|
+
atom_data = StringIO.new(alac_atom.data)
|
136
|
+
|
137
|
+
atom_data.seek(45, IO::SEEK_CUR)
|
138
|
+
@bit_depth = atom_data.read(1).unpack1("C")
|
139
|
+
|
140
|
+
atom_data.seek(10, IO::SEEK_CUR)
|
141
|
+
@bitrate = (atom_data.read(4).unpack1("I>") / 1000.to_f).round
|
142
|
+
@sample_rate = atom_data.read(4).unpack1("I>")
|
143
|
+
end
|
131
144
|
end
|
132
145
|
|
133
146
|
def parse_image_data(image_data_atom)
|
data/lib/wahwah/riff_tag.rb
CHANGED
@@ -109,17 +109,18 @@ module WahWah
|
|
109
109
|
# And INFO chunk as a subchunk for LIST chunk.
|
110
110
|
if chunk.type != "INFO"
|
111
111
|
chunk.skip
|
112
|
-
|
113
|
-
|
114
|
-
info_chunk = Riff::Chunk.new(@file_io)
|
112
|
+
return
|
113
|
+
end
|
115
114
|
|
116
|
-
|
117
|
-
|
118
|
-
next
|
119
|
-
end
|
115
|
+
until list_chunk_end_position <= @file_io.pos
|
116
|
+
info_chunk = Riff::Chunk.new(@file_io)
|
120
117
|
|
121
|
-
|
118
|
+
unless INFO_ID_MAPPING.key? info_chunk.id.to_sym
|
119
|
+
info_chunk.skip
|
120
|
+
next
|
122
121
|
end
|
122
|
+
|
123
|
+
update_attribute(info_chunk)
|
123
124
|
end
|
124
125
|
end
|
125
126
|
|
data/lib/wahwah/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wahwah
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- aidewoode
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-06-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
75
|
+
version: 0.22.0
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.
|
82
|
+
version: 0.22.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: simplecov-lcov
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -167,14 +167,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
167
167
|
requirements:
|
168
168
|
- - ">="
|
169
169
|
- !ruby/object:Gem::Version
|
170
|
-
version: 2.
|
170
|
+
version: 2.7.0
|
171
171
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
172
172
|
requirements:
|
173
173
|
- - ">="
|
174
174
|
- !ruby/object:Gem::Version
|
175
175
|
version: '0'
|
176
176
|
requirements: []
|
177
|
-
rubygems_version: 3.
|
177
|
+
rubygems_version: 3.3.26
|
178
178
|
signing_key:
|
179
179
|
specification_version: 4
|
180
180
|
summary: Audio metadata reader ruby gem
|