waveinfo 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 019a1fe05e310596c1bd2f79a635229f3eb37fb0
4
+ data.tar.gz: 468bb5008ef0bfe68f3e6143f186d60f50b24923
5
+ SHA512:
6
+ metadata.gz: a94283ffa068adc219f2258a243d98fe5460dbf0fae0e2524a09006cb8ae107d7264b7cae9e30cecb92fae4aaabade5055e63d0f067679a6081bf208b212978f
7
+ data.tar.gz: 0dfc1cf21d32d9201f1ae72e915593f1518267cb80dcc9e531890773b05d601b31e0cc3d7ab753ac625bfae725f16357f65e5a32dd1ede78f5a8598807024a26
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2009-2014 Nicholas J Humfrey
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md CHANGED
@@ -3,6 +3,7 @@ waveinfo
3
3
 
4
4
  waveinfo is a pure-ruby gem to get the information from the headers of Wave (.wav) files.
5
5
 
6
+
6
7
  Installing
7
8
  ----------
8
9
 
@@ -43,7 +44,15 @@ Resources
43
44
  ---------
44
45
 
45
46
  * GitHub Project: http://github.com/njh/ruby-waveinfo
46
- * Documentation: http://rdoc.info/github/njh/ruby-waveinfo/master/frames
47
+ * Documentation: http://rdoc.info/gems/waveinfo
48
+
49
+
50
+ License
51
+ -------
52
+
53
+ The waveinfo ruby gem is licensed under the terms of the MIT license.
54
+ See the file LICENSE for details.
55
+
47
56
 
48
57
  Contact
49
58
  -------
@@ -51,5 +60,4 @@ Contact
51
60
  * Author: Nicholas J Humfrey
52
61
  * Email: njh@aelius.com
53
62
  * Home Page: http://www.aelius.com/njh/
54
- * License: Distributes under the same terms as Ruby
55
63
 
@@ -62,6 +62,8 @@ class WaveInfo
62
62
  "MPEG-1 Audio"
63
63
  when 0x55 then
64
64
  "MPEG Audio Layer 3"
65
+ when 0xFFFE
66
+ "Extensible wave format"
65
67
  else
66
68
  sprintf("Unknown (0x%2.2x)",@audio_format_id)
67
69
  end
@@ -116,7 +118,7 @@ class WaveInfo
116
118
  def read_headers
117
119
  # Read in the chunk header
118
120
  chunk_id = read_fourchar
119
- raise FileFormatError.new("Chunk id is not 'RIFF'") if chunk_id != 'RIFF'
121
+ raise FileFormatError.new("Chunk id is not 'RIFF' or 'RF64'") if chunk_id != 'RIFF' && chunk_id != 'RF64'
120
122
  chunk_size = read_longint
121
123
  chunk_format = read_fourchar
122
124
  raise FileFormatError.new("Chunk format is not 'WAVE'") if chunk_format != 'WAVE'
@@ -180,7 +182,7 @@ class WaveInfo
180
182
  end
181
183
 
182
184
  # Exception raised if there is a problem parsing the Wave file
183
- class FileFormatError < Exception
185
+ class FileFormatError < StandardError
184
186
  end
185
187
 
186
188
  end
@@ -1,3 +1,3 @@
1
1
  class WaveInfo
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -13,47 +13,47 @@ describe WaveInfo do
13
13
  end
14
14
 
15
15
  it "should get the audio format id right" do
16
- @wav.audio_format_id.should == 1
16
+ expect(@wav.audio_format_id).to eq(1)
17
17
  end
18
18
 
19
19
  it "should get the audio format name right" do
20
- @wav.audio_format.should == 'PCM'
20
+ expect(@wav.audio_format).to eq('PCM')
21
21
  end
22
22
 
23
23
  it "should get the number of channels right" do
24
- @wav.channels.should == 1
24
+ expect(@wav.channels).to eq(1)
25
25
  end
26
26
 
27
27
  it "should get the sample rate right" do
28
- @wav.sample_rate.should == 11025
28
+ expect(@wav.sample_rate).to eq(11025)
29
29
  end
30
30
 
31
31
  it "should get the byte rate right" do
32
- @wav.byte_rate.should == 22050
32
+ expect(@wav.byte_rate).to eq(22050)
33
33
  end
34
34
 
35
35
  it "should get the block align value right" do
36
- @wav.block_align.should == 2
36
+ expect(@wav.block_align).to eq(2)
37
37
  end
38
38
 
39
39
  it "should get the bits per sample right" do
40
- @wav.bits_per_sample.should == 16
40
+ expect(@wav.bits_per_sample).to eq(16)
41
41
  end
42
42
 
43
43
  it "should get the audio length in bytes right" do
44
- @wav.size.should == 8820
44
+ expect(@wav.size).to eq(8820)
45
45
  end
46
46
 
47
47
  it "should get the number of samples right" do
48
- @wav.samples.should == 4410
48
+ expect(@wav.samples).to eq(4410)
49
49
  end
50
50
 
51
51
  it "should get the audio duration right" do
52
- @wav.duration.should == 0.4
52
+ expect(@wav.duration).to eq(0.4)
53
53
  end
54
54
 
55
55
  it "should know the name of the file read from" do
56
- @wav.filename.should == File.basename(@filepath)
56
+ expect(@wav.filename).to eq(File.basename(@filepath))
57
57
  end
58
58
  end
59
59
 
@@ -64,47 +64,47 @@ describe WaveInfo do
64
64
  end
65
65
 
66
66
  it "should get the audio format id right" do
67
- @wav.audio_format_id.should == 49
67
+ expect(@wav.audio_format_id).to eq(49)
68
68
  end
69
69
 
70
70
  it "should get the audio format name right" do
71
- @wav.audio_format.should == 'GSM'
71
+ expect(@wav.audio_format).to eq('GSM')
72
72
  end
73
73
 
74
74
  it "should get the number of channels right" do
75
- @wav.channels.should == 1
75
+ expect(@wav.channels).to eq(1)
76
76
  end
77
77
 
78
78
  it "should get the sample rate right" do
79
- @wav.sample_rate.should == 8000
79
+ expect(@wav.sample_rate).to eq(8000)
80
80
  end
81
81
 
82
82
  it "should get the byte rate right" do
83
- @wav.byte_rate.should == 1625
83
+ expect(@wav.byte_rate).to eq(1625)
84
84
  end
85
85
 
86
86
  it "should get the block align value right" do
87
- @wav.block_align.should == 65
87
+ expect(@wav.block_align).to eq(65)
88
88
  end
89
89
 
90
90
  it "should get the bits per sample right" do
91
- @wav.bits_per_sample.should == 0
91
+ expect(@wav.bits_per_sample).to eq(0)
92
92
  end
93
93
 
94
94
  it "should get the audio length in bytes right" do
95
- @wav.size.should == 650
95
+ expect(@wav.size).to eq(650)
96
96
  end
97
97
 
98
98
  it "should get the number of samples right" do
99
- @wav.samples.should == 3200
99
+ expect(@wav.samples).to eq(3200)
100
100
  end
101
101
 
102
102
  it "should get the audio duration right" do
103
- @wav.duration.should == 0.4
103
+ expect(@wav.duration).to eq(0.4)
104
104
  end
105
105
 
106
106
  it "should know the name of the file read from" do
107
- @wav.filename.should == File.basename(@filepath)
107
+ expect(@wav.filename).to eq(File.basename(@filepath))
108
108
  end
109
109
  end
110
110
 
@@ -115,47 +115,47 @@ describe WaveInfo do
115
115
  end
116
116
 
117
117
  it "should get the audio format id right" do
118
- @wav.audio_format_id.should == 1
118
+ expect(@wav.audio_format_id).to eq(1)
119
119
  end
120
120
 
121
121
  it "should get the audio format name right" do
122
- @wav.audio_format.should == 'PCM'
122
+ expect(@wav.audio_format).to eq('PCM')
123
123
  end
124
124
 
125
125
  it "should get the number of channels right" do
126
- @wav.channels.should == 2
126
+ expect(@wav.channels).to eq(2)
127
127
  end
128
128
 
129
129
  it "should get the sample rate right" do
130
- @wav.sample_rate.should == 44100
130
+ expect(@wav.sample_rate).to eq(44100)
131
131
  end
132
132
 
133
133
  it "should get the byte rate right" do
134
- @wav.byte_rate.should == 176400
134
+ expect(@wav.byte_rate).to eq(176400)
135
135
  end
136
136
 
137
137
  it "should get the block align value right" do
138
- @wav.block_align.should == 4
138
+ expect(@wav.block_align).to eq(4)
139
139
  end
140
140
 
141
141
  it "should get the bits per sample right" do
142
- @wav.bits_per_sample.should == 16
142
+ expect(@wav.bits_per_sample).to eq(16)
143
143
  end
144
144
 
145
145
  it "should get the audio length in bytes right" do
146
- @wav.size.should == 100000
146
+ expect(@wav.size).to eq(100000)
147
147
  end
148
148
 
149
149
  it "should get the number of samples right" do
150
- @wav.samples.should == 25000
150
+ expect(@wav.samples).to eq(25000)
151
151
  end
152
152
 
153
153
  it "should get the audio duration right" do
154
- (@wav.duration * 1000).to_i.should == 566
154
+ expect((@wav.duration * 1000).to_i).to eq(566)
155
155
  end
156
156
 
157
157
  it "should know the name of the file read from" do
158
- @wav.filename.should == File.basename(@filepath)
158
+ expect(@wav.filename).to eq(File.basename(@filepath))
159
159
  end
160
160
  end
161
161
 
@@ -166,47 +166,47 @@ describe WaveInfo do
166
166
  end
167
167
 
168
168
  it "should get the audio format id right" do
169
- @wav.audio_format_id.should == 2
169
+ expect(@wav.audio_format_id).to eq(2)
170
170
  end
171
171
 
172
172
  it "should get the audio format name right" do
173
- @wav.audio_format.should == 'Microsoft ADPCM'
173
+ expect(@wav.audio_format).to eq('Microsoft ADPCM')
174
174
  end
175
175
 
176
176
  it "should get the number of channels right" do
177
- @wav.channels.should == 1
177
+ expect(@wav.channels).to eq(1)
178
178
  end
179
179
 
180
180
  it "should get the sample rate right" do
181
- @wav.sample_rate.should == 11025
181
+ expect(@wav.sample_rate).to eq(11025)
182
182
  end
183
183
 
184
184
  it "should get the byte rate right" do
185
- @wav.byte_rate.should == 5784
185
+ expect(@wav.byte_rate).to eq(5784)
186
186
  end
187
187
 
188
188
  it "should get the block align value right" do
189
- @wav.block_align.should == 128
189
+ expect(@wav.block_align).to eq(128)
190
190
  end
191
191
 
192
192
  it "should get the bits per sample right" do
193
- @wav.bits_per_sample.should == 4
193
+ expect(@wav.bits_per_sample).to eq(4)
194
194
  end
195
195
 
196
196
  it "should get the audio length in bytes right" do
197
- @wav.size.should == 2432
197
+ expect(@wav.size).to eq(2432)
198
198
  end
199
199
 
200
200
  it "should get the number of samples right" do
201
- @wav.samples.should == 4410
201
+ expect(@wav.samples).to eq(4410)
202
202
  end
203
203
 
204
204
  it "should get the audio duration right" do
205
- @wav.duration.should == 0.4
205
+ expect(@wav.duration).to eq(0.4)
206
206
  end
207
207
 
208
208
  it "should know the name of the file read from" do
209
- @wav.filename.should == File.basename(@filepath)
209
+ expect(@wav.filename).to eq(File.basename(@filepath))
210
210
  end
211
211
  end
212
212
 
@@ -217,47 +217,47 @@ describe WaveInfo do
217
217
  end
218
218
 
219
219
  it "should get the audio format id right" do
220
- @wav.audio_format_id.should == 1
220
+ expect(@wav.audio_format_id).to eq(1)
221
221
  end
222
222
 
223
223
  it "should get the audio format name right" do
224
- @wav.audio_format.should == 'PCM'
224
+ expect(@wav.audio_format).to eq('PCM')
225
225
  end
226
226
 
227
227
  it "should get the number of channels right" do
228
- @wav.channels.should == 1
228
+ expect(@wav.channels).to eq(1)
229
229
  end
230
230
 
231
231
  it "should get the sample rate right" do
232
- @wav.sample_rate.should == 11025
232
+ expect(@wav.sample_rate).to eq(11025)
233
233
  end
234
234
 
235
235
  it "should get the byte rate right" do
236
- @wav.byte_rate.should == 11025
236
+ expect(@wav.byte_rate).to eq(11025)
237
237
  end
238
238
 
239
239
  it "should get the block align value right" do
240
- @wav.block_align.should == 1
240
+ expect(@wav.block_align).to eq(1)
241
241
  end
242
242
 
243
243
  it "should get the bits per sample right" do
244
- @wav.bits_per_sample.should == 8
244
+ expect(@wav.bits_per_sample).to eq(8)
245
245
  end
246
246
 
247
247
  it "should get the audio length in bytes right" do
248
- @wav.size.should == 4410
248
+ expect(@wav.size).to eq(4410)
249
249
  end
250
250
 
251
251
  it "should get the number of samples right" do
252
- @wav.samples.should == 4410
252
+ expect(@wav.samples).to eq(4410)
253
253
  end
254
254
 
255
255
  it "should get the audio duration right" do
256
- @wav.duration.should == 0.4
256
+ expect(@wav.duration).to eq(0.4)
257
257
  end
258
258
 
259
259
  it "should know the name of the file read from" do
260
- @wav.filename.should == File.basename(@filepath)
260
+ expect(@wav.filename).to eq(File.basename(@filepath))
261
261
  end
262
262
  end
263
263
 
@@ -268,47 +268,47 @@ describe WaveInfo do
268
268
  end
269
269
 
270
270
  it "should get the audio format id right" do
271
- @wav.audio_format_id.should == 6
271
+ expect(@wav.audio_format_id).to eq(6)
272
272
  end
273
273
 
274
274
  it "should get the audio format name right" do
275
- @wav.audio_format.should == 'a-law'
275
+ expect(@wav.audio_format).to eq('a-law')
276
276
  end
277
277
 
278
278
  it "should get the number of channels right" do
279
- @wav.channels.should == 1
279
+ expect(@wav.channels).to eq(1)
280
280
  end
281
281
 
282
282
  it "should get the sample rate right" do
283
- @wav.sample_rate.should == 11025
283
+ expect(@wav.sample_rate).to eq(11025)
284
284
  end
285
285
 
286
286
  it "should get the byte rate right" do
287
- @wav.byte_rate.should == 11025
287
+ expect(@wav.byte_rate).to eq(11025)
288
288
  end
289
289
 
290
290
  it "should get the block align value right" do
291
- @wav.block_align.should == 1
291
+ expect(@wav.block_align).to eq(1)
292
292
  end
293
293
 
294
294
  it "should get the bits per sample right" do
295
- @wav.bits_per_sample.should == 8
295
+ expect(@wav.bits_per_sample).to eq(8)
296
296
  end
297
297
 
298
298
  it "should get the audio length in bytes right" do
299
- @wav.size.should == 4410
299
+ expect(@wav.size).to eq(4410)
300
300
  end
301
301
 
302
302
  it "should get the number of samples right" do
303
- @wav.samples.should == 4410
303
+ expect(@wav.samples).to eq(4410)
304
304
  end
305
305
 
306
306
  it "should get the audio duration right" do
307
- @wav.duration.should == 0.4
307
+ expect(@wav.duration).to eq(0.4)
308
308
  end
309
309
 
310
310
  it "should know the name of the file read from" do
311
- @wav.filename.should == File.basename(@filepath)
311
+ expect(@wav.filename).to eq(File.basename(@filepath))
312
312
  end
313
313
  end
314
314
 
@@ -319,47 +319,47 @@ describe WaveInfo do
319
319
  end
320
320
 
321
321
  it "should get the audio format id right" do
322
- @wav.audio_format_id.should == 7
322
+ expect(@wav.audio_format_id).to eq(7)
323
323
  end
324
324
 
325
325
  it "should get the audio format name right" do
326
- @wav.audio_format.should == 'u-law'
326
+ expect(@wav.audio_format).to eq('u-law')
327
327
  end
328
328
 
329
329
  it "should get the number of channels right" do
330
- @wav.channels.should == 1
330
+ expect(@wav.channels).to eq(1)
331
331
  end
332
332
 
333
333
  it "should get the sample rate right" do
334
- @wav.sample_rate.should == 11025
334
+ expect(@wav.sample_rate).to eq(11025)
335
335
  end
336
336
 
337
337
  it "should get the byte rate right" do
338
- @wav.byte_rate.should == 11025
338
+ expect(@wav.byte_rate).to eq(11025)
339
339
  end
340
340
 
341
341
  it "should get the block align value right" do
342
- @wav.block_align.should == 1
342
+ expect(@wav.block_align).to eq(1)
343
343
  end
344
344
 
345
345
  it "should get the bits per sample right" do
346
- @wav.bits_per_sample.should == 8
346
+ expect(@wav.bits_per_sample).to eq(8)
347
347
  end
348
348
 
349
349
  it "should get the audio length in bytes right" do
350
- @wav.size.should == 4410
350
+ expect(@wav.size).to eq(4410)
351
351
  end
352
352
 
353
353
  it "should get the number of samples right" do
354
- @wav.samples.should == 4410
354
+ expect(@wav.samples).to eq(4410)
355
355
  end
356
356
 
357
357
  it "should get the audio duration right" do
358
- @wav.duration.should == 0.4
358
+ expect(@wav.duration).to eq(0.4)
359
359
  end
360
360
 
361
361
  it "should know the name of the file read from" do
362
- @wav.filename.should == File.basename(@filepath)
362
+ expect(@wav.filename).to eq(File.basename(@filepath))
363
363
  end
364
364
  end
365
365
 
@@ -370,69 +370,120 @@ describe WaveInfo do
370
370
  end
371
371
 
372
372
  it "should get the audio format id right" do
373
- @wav.audio_format_id.should == 17
373
+ expect(@wav.audio_format_id).to eq(17)
374
374
  end
375
375
 
376
376
  it "should get the audio format name right" do
377
- @wav.audio_format.should == 'IMA ADPCM'
377
+ expect(@wav.audio_format).to eq('IMA ADPCM')
378
378
  end
379
379
 
380
380
  it "should get the number of channels right" do
381
- @wav.channels.should == 1
381
+ expect(@wav.channels).to eq(1)
382
382
  end
383
383
 
384
384
  it "should get the sample rate right" do
385
- @wav.sample_rate.should == 11025
385
+ expect(@wav.sample_rate).to eq(11025)
386
386
  end
387
387
 
388
388
  it "should get the byte rate right" do
389
- @wav.byte_rate.should == 5589
389
+ expect(@wav.byte_rate).to eq(5589)
390
390
  end
391
391
 
392
392
  it "should get the block align value right" do
393
- @wav.block_align.should == 256
393
+ expect(@wav.block_align).to eq(256)
394
394
  end
395
395
 
396
396
  it "should get the bits per sample right" do
397
- @wav.bits_per_sample.should == 4
397
+ expect(@wav.bits_per_sample).to eq(4)
398
398
  end
399
399
 
400
400
  it "should get the audio length in bytes right" do
401
- @wav.size.should == 2304
401
+ expect(@wav.size).to eq(2304)
402
402
  end
403
403
 
404
404
  it "should get the number of samples right" do
405
- @wav.samples.should == 4410
405
+ expect(@wav.samples).to eq(4410)
406
406
  end
407
407
 
408
408
  it "should get the audio duration right" do
409
- @wav.duration.should == 0.4
409
+ expect(@wav.duration).to eq(0.4)
410
410
  end
411
411
 
412
412
  it "should know the name of the file read from" do
413
- @wav.filename.should == File.basename(@filepath)
413
+ expect(@wav.filename).to eq(File.basename(@filepath))
414
414
  end
415
415
  end
416
-
416
+
417
+ describe "parsing a Stereo 96kHz 24bit RF64" do
418
+ before :each do
419
+ @filepath = sample_path('empty_96k_stereo_24bit_rf64')
420
+ @wav = WaveInfo.new( @filepath )
421
+ end
422
+
423
+ it "should get the audio format id right" do
424
+ expect(@wav.audio_format_id).to eq(65534)
425
+ end
426
+
427
+ it "should get the audio format name right" do
428
+ expect(@wav.audio_format).to eq('Extensible wave format')
429
+ end
430
+
431
+ it "should get the number of channels right" do
432
+ expect(@wav.channels).to eq(2)
433
+ end
434
+
435
+ it "should get the sample rate right" do
436
+ expect(@wav.sample_rate).to eq(96000)
437
+ end
438
+
439
+ it "should get the byte rate right" do
440
+ expect(@wav.byte_rate).to eq(576000)
441
+ end
442
+
443
+ it "should get the block align value right" do
444
+ expect(@wav.block_align).to eq(6)
445
+ end
446
+
447
+ it "should get the bits per sample right" do
448
+ expect(@wav.bits_per_sample).to eq(24)
449
+ end
450
+
451
+ it "should get the audio length in bytes right" do
452
+ expect(@wav.size).to eq(4294967295)
453
+ end
454
+
455
+ it "should get the number of samples right" do
456
+ expect(@wav.samples).to eq(715827882)
457
+ end
458
+
459
+ it "should get the audio duration right" do
460
+ expect(@wav.duration).to eq(7456.5404375)
461
+ end
462
+
463
+ it "should know the name of the file read from" do
464
+ expect(@wav.filename).to eq(File.basename(@filepath))
465
+ end
466
+ end
467
+
417
468
  describe "parsing an invalid WAVE file" do
418
469
  it "should throw an exception if the first chunk id isn't 'RIFF'" do
419
470
  data = StringIO.new("INVALID")
420
- lambda { WaveInfo.new( data ) }.should raise_error(WaveInfo::FileFormatError)
471
+ expect { WaveInfo.new( data ) }.to raise_error(WaveInfo::FileFormatError)
421
472
  end
422
473
 
423
474
  it "should throw an exception if the chunk format isn't 'WAVE'" do
424
475
  data = StringIO.new("RIFF\0\0\0\0INVALID")
425
- lambda { WaveInfo.new( data ) }.should raise_error(WaveInfo::FileFormatError)
476
+ expect { WaveInfo.new( data ) }.to raise_error(WaveInfo::FileFormatError)
426
477
  end
427
478
 
428
479
  it "should not throw an exception if WAVE file is valid but has no sub-chunks" do
429
480
  data = StringIO.new("RIFF\4\0\0\0WAVE")
430
- lambda { WaveInfo.new( data ) }.should_not raise_error
481
+ expect { WaveInfo.new( data ) }.not_to raise_error
431
482
  end
432
483
 
433
484
  it "should set the audio format name to Unknown for an unknown audio codec" do
434
485
  data = StringIO.new("RIFF\x14\0\0\0WAVEfmt \x0a\0\0\0\xff\x00\x02\0\0\0\0\0\0\0\0\0\0\0\0\0")
435
- WaveInfo.new( data ).audio_format.should == 'Unknown (0xff)'
486
+ expect(WaveInfo.new( data ).audio_format).to eq('Unknown (0xff)')
436
487
  end
437
488
  end
438
489
  end
metadata CHANGED
@@ -1,78 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: waveinfo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
5
- prerelease:
4
+ version: 0.0.3
6
5
  platform: ruby
7
6
  authors:
8
7
  - Nicholas J Humfrey
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-12-21 00:00:00.000000000 Z
11
+ date: 2014-09-01 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: bundler
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
19
  version: 1.0.14
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - ">="
28
25
  - !ruby/object:Gem::Version
29
26
  version: 1.0.14
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: yard
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - ">="
36
32
  - !ruby/object:Gem::Version
37
33
  version: 0.7.2
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - ">="
44
39
  - !ruby/object:Gem::Version
45
40
  version: 0.7.2
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rake
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - ">="
52
46
  - !ruby/object:Gem::Version
53
47
  version: 0.8.7
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - ">="
60
53
  - !ruby/object:Gem::Version
61
54
  version: 0.8.7
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: rspec
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - ">="
68
60
  - !ruby/object:Gem::Version
69
61
  version: 2.6.0
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - ">="
76
67
  - !ruby/object:Gem::Version
77
68
  version: 2.6.0
78
69
  description: waveinfo is a pure-ruby gem to get the information from the headers of
@@ -83,37 +74,35 @@ executables:
83
74
  extensions: []
84
75
  extra_rdoc_files: []
85
76
  files:
77
+ - LICENSE.md
86
78
  - README.md
87
- - COPYING
88
- - GPL
89
- - lib/waveinfo/version.rb
79
+ - bin/waveinfo
90
80
  - lib/waveinfo.rb
81
+ - lib/waveinfo/version.rb
91
82
  - spec/waveinfo_spec.rb
92
- - bin/waveinfo
93
83
  homepage: http://github.com/njh/ruby-waveinfo
94
84
  licenses:
95
- - Ruby
85
+ - MIT
86
+ metadata: {}
96
87
  post_install_message:
97
88
  rdoc_options: []
98
89
  require_paths:
99
90
  - lib
100
91
  required_ruby_version: !ruby/object:Gem::Requirement
101
- none: false
102
92
  requirements:
103
- - - ! '>='
93
+ - - ">="
104
94
  - !ruby/object:Gem::Version
105
95
  version: '0'
106
96
  required_rubygems_version: !ruby/object:Gem::Requirement
107
- none: false
108
97
  requirements:
109
- - - ! '>='
98
+ - - ">="
110
99
  - !ruby/object:Gem::Version
111
100
  version: '0'
112
101
  requirements: []
113
102
  rubyforge_project: waveinfo
114
- rubygems_version: 1.8.23
103
+ rubygems_version: 2.2.2
115
104
  signing_key:
116
- specification_version: 3
105
+ specification_version: 4
117
106
  summary: Pure-ruby gem to get the information from the headers of Wave (.wav) files.
118
107
  test_files:
119
108
  - spec/waveinfo_spec.rb
data/COPYING DELETED
@@ -1,56 +0,0 @@
1
- ruby-mpris is copyrighted free software by Nicholas J Humfrey <njh@aelius.com>.
2
- You can redistribute it and/or modify it under either the terms of the GPL
3
- version 2 (see the file GPL), or the conditions below:
4
-
5
- 1. You may make and give away verbatim copies of the source form of the
6
- software without restriction, provided that you duplicate all of the
7
- original copyright notices and associated disclaimers.
8
-
9
- 2. You may modify your copy of the software in any way, provided that
10
- you do at least ONE of the following:
11
-
12
- a) place your modifications in the Public Domain or otherwise
13
- make them Freely Available, such as by posting said
14
- modifications to Usenet or an equivalent medium, or by allowing
15
- the author to include your modifications in the software.
16
-
17
- b) use the modified software only within your corporation or
18
- organization.
19
-
20
- c) give non-standard binaries non-standard names, with
21
- instructions on where to get the original software distribution.
22
-
23
- d) make other distribution arrangements with the author.
24
-
25
- 3. You may distribute the software in object code or binary form,
26
- provided that you do at least ONE of the following:
27
-
28
- a) distribute the binaries and library files of the software,
29
- together with instructions (in the manual page or equivalent)
30
- on where to get the original distribution.
31
-
32
- b) accompany the distribution with the machine-readable source of
33
- the software.
34
-
35
- c) give non-standard binaries non-standard names, with
36
- instructions on where to get the original software distribution.
37
-
38
- d) make other distribution arrangements with the author.
39
-
40
- 4. You may modify and include the part of the software into any other
41
- software (possibly commercial). But some files in the distribution
42
- are not written by the author, so that they are not under these terms.
43
-
44
- For the list of those files and their copying conditions, see the
45
- file LEGAL.
46
-
47
- 5. The scripts and library files supplied as input to or produced as
48
- output from the software do not automatically fall under the
49
- copyright of the software, but belong to whomever generated them,
50
- and may be sold commercially, and may be aggregated with this
51
- software.
52
-
53
- 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
54
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
55
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
56
- PURPOSE.
data/GPL DELETED
@@ -1,340 +0,0 @@
1
- GNU GENERAL PUBLIC LICENSE
2
- Version 2, June 1991
3
-
4
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
6
- Everyone is permitted to copy and distribute verbatim copies
7
- of this license document, but changing it is not allowed.
8
-
9
- Preamble
10
-
11
- The licenses for most software are designed to take away your
12
- freedom to share and change it. By contrast, the GNU General Public
13
- License is intended to guarantee your freedom to share and change free
14
- software--to make sure the software is free for all its users. This
15
- General Public License applies to most of the Free Software
16
- Foundation's software and to any other program whose authors commit to
17
- using it. (Some other Free Software Foundation software is covered by
18
- the GNU Library General Public License instead.) You can apply it to
19
- your programs, too.
20
-
21
- When we speak of free software, we are referring to freedom, not
22
- price. Our General Public Licenses are designed to make sure that you
23
- have the freedom to distribute copies of free software (and charge for
24
- this service if you wish), that you receive source code or can get it
25
- if you want it, that you can change the software or use pieces of it
26
- in new free programs; and that you know you can do these things.
27
-
28
- To protect your rights, we need to make restrictions that forbid
29
- anyone to deny you these rights or to ask you to surrender the rights.
30
- These restrictions translate to certain responsibilities for you if you
31
- distribute copies of the software, or if you modify it.
32
-
33
- For example, if you distribute copies of such a program, whether
34
- gratis or for a fee, you must give the recipients all the rights that
35
- you have. You must make sure that they, too, receive or can get the
36
- source code. And you must show them these terms so they know their
37
- rights.
38
-
39
- We protect your rights with two steps: (1) copyright the software, and
40
- (2) offer you this license which gives you legal permission to copy,
41
- distribute and/or modify the software.
42
-
43
- Also, for each author's protection and ours, we want to make certain
44
- that everyone understands that there is no warranty for this free
45
- software. If the software is modified by someone else and passed on, we
46
- want its recipients to know that what they have is not the original, so
47
- that any problems introduced by others will not reflect on the original
48
- authors' reputations.
49
-
50
- Finally, any free program is threatened constantly by software
51
- patents. We wish to avoid the danger that redistributors of a free
52
- program will individually obtain patent licenses, in effect making the
53
- program proprietary. To prevent this, we have made it clear that any
54
- patent must be licensed for everyone's free use or not licensed at all.
55
-
56
- The precise terms and conditions for copying, distribution and
57
- modification follow.
58
-
59
- GNU GENERAL PUBLIC LICENSE
60
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
-
62
- 0. This License applies to any program or other work which contains
63
- a notice placed by the copyright holder saying it may be distributed
64
- under the terms of this General Public License. The "Program", below,
65
- refers to any such program or work, and a "work based on the Program"
66
- means either the Program or any derivative work under copyright law:
67
- that is to say, a work containing the Program or a portion of it,
68
- either verbatim or with modifications and/or translated into another
69
- language. (Hereinafter, translation is included without limitation in
70
- the term "modification".) Each licensee is addressed as "you".
71
-
72
- Activities other than copying, distribution and modification are not
73
- covered by this License; they are outside its scope. The act of
74
- running the Program is not restricted, and the output from the Program
75
- is covered only if its contents constitute a work based on the
76
- Program (independent of having been made by running the Program).
77
- Whether that is true depends on what the Program does.
78
-
79
- 1. You may copy and distribute verbatim copies of the Program's
80
- source code as you receive it, in any medium, provided that you
81
- conspicuously and appropriately publish on each copy an appropriate
82
- copyright notice and disclaimer of warranty; keep intact all the
83
- notices that refer to this License and to the absence of any warranty;
84
- and give any other recipients of the Program a copy of this License
85
- along with the Program.
86
-
87
- You may charge a fee for the physical act of transferring a copy, and
88
- you may at your option offer warranty protection in exchange for a fee.
89
-
90
- 2. You may modify your copy or copies of the Program or any portion
91
- of it, thus forming a work based on the Program, and copy and
92
- distribute such modifications or work under the terms of Section 1
93
- above, provided that you also meet all of these conditions:
94
-
95
- a) You must cause the modified files to carry prominent notices
96
- stating that you changed the files and the date of any change.
97
-
98
- b) You must cause any work that you distribute or publish, that in
99
- whole or in part contains or is derived from the Program or any
100
- part thereof, to be licensed as a whole at no charge to all third
101
- parties under the terms of this License.
102
-
103
- c) If the modified program normally reads commands interactively
104
- when run, you must cause it, when started running for such
105
- interactive use in the most ordinary way, to print or display an
106
- announcement including an appropriate copyright notice and a
107
- notice that there is no warranty (or else, saying that you provide
108
- a warranty) and that users may redistribute the program under
109
- these conditions, and telling the user how to view a copy of this
110
- License. (Exception: if the Program itself is interactive but
111
- does not normally print such an announcement, your work based on
112
- the Program is not required to print an announcement.)
113
-
114
- These requirements apply to the modified work as a whole. If
115
- identifiable sections of that work are not derived from the Program,
116
- and can be reasonably considered independent and separate works in
117
- themselves, then this License, and its terms, do not apply to those
118
- sections when you distribute them as separate works. But when you
119
- distribute the same sections as part of a whole which is a work based
120
- on the Program, the distribution of the whole must be on the terms of
121
- this License, whose permissions for other licensees extend to the
122
- entire whole, and thus to each and every part regardless of who wrote it.
123
-
124
- Thus, it is not the intent of this section to claim rights or contest
125
- your rights to work written entirely by you; rather, the intent is to
126
- exercise the right to control the distribution of derivative or
127
- collective works based on the Program.
128
-
129
- In addition, mere aggregation of another work not based on the Program
130
- with the Program (or with a work based on the Program) on a volume of
131
- a storage or distribution medium does not bring the other work under
132
- the scope of this License.
133
-
134
- 3. You may copy and distribute the Program (or a work based on it,
135
- under Section 2) in object code or executable form under the terms of
136
- Sections 1 and 2 above provided that you also do one of the following:
137
-
138
- a) Accompany it with the complete corresponding machine-readable
139
- source code, which must be distributed under the terms of Sections
140
- 1 and 2 above on a medium customarily used for software interchange; or,
141
-
142
- b) Accompany it with a written offer, valid for at least three
143
- years, to give any third party, for a charge no more than your
144
- cost of physically performing source distribution, a complete
145
- machine-readable copy of the corresponding source code, to be
146
- distributed under the terms of Sections 1 and 2 above on a medium
147
- customarily used for software interchange; or,
148
-
149
- c) Accompany it with the information you received as to the offer
150
- to distribute corresponding source code. (This alternative is
151
- allowed only for noncommercial distribution and only if you
152
- received the program in object code or executable form with such
153
- an offer, in accord with Subsection b above.)
154
-
155
- The source code for a work means the preferred form of the work for
156
- making modifications to it. For an executable work, complete source
157
- code means all the source code for all modules it contains, plus any
158
- associated interface definition files, plus the scripts used to
159
- control compilation and installation of the executable. However, as a
160
- special exception, the source code distributed need not include
161
- anything that is normally distributed (in either source or binary
162
- form) with the major components (compiler, kernel, and so on) of the
163
- operating system on which the executable runs, unless that component
164
- itself accompanies the executable.
165
-
166
- If distribution of executable or object code is made by offering
167
- access to copy from a designated place, then offering equivalent
168
- access to copy the source code from the same place counts as
169
- distribution of the source code, even though third parties are not
170
- compelled to copy the source along with the object code.
171
-
172
- 4. You may not copy, modify, sublicense, or distribute the Program
173
- except as expressly provided under this License. Any attempt
174
- otherwise to copy, modify, sublicense or distribute the Program is
175
- void, and will automatically terminate your rights under this License.
176
- However, parties who have received copies, or rights, from you under
177
- this License will not have their licenses terminated so long as such
178
- parties remain in full compliance.
179
-
180
- 5. You are not required to accept this License, since you have not
181
- signed it. However, nothing else grants you permission to modify or
182
- distribute the Program or its derivative works. These actions are
183
- prohibited by law if you do not accept this License. Therefore, by
184
- modifying or distributing the Program (or any work based on the
185
- Program), you indicate your acceptance of this License to do so, and
186
- all its terms and conditions for copying, distributing or modifying
187
- the Program or works based on it.
188
-
189
- 6. Each time you redistribute the Program (or any work based on the
190
- Program), the recipient automatically receives a license from the
191
- original licensor to copy, distribute or modify the Program subject to
192
- these terms and conditions. You may not impose any further
193
- restrictions on the recipients' exercise of the rights granted herein.
194
- You are not responsible for enforcing compliance by third parties to
195
- this License.
196
-
197
- 7. If, as a consequence of a court judgment or allegation of patent
198
- infringement or for any other reason (not limited to patent issues),
199
- conditions are imposed on you (whether by court order, agreement or
200
- otherwise) that contradict the conditions of this License, they do not
201
- excuse you from the conditions of this License. If you cannot
202
- distribute so as to satisfy simultaneously your obligations under this
203
- License and any other pertinent obligations, then as a consequence you
204
- may not distribute the Program at all. For example, if a patent
205
- license would not permit royalty-free redistribution of the Program by
206
- all those who receive copies directly or indirectly through you, then
207
- the only way you could satisfy both it and this License would be to
208
- refrain entirely from distribution of the Program.
209
-
210
- If any portion of this section is held invalid or unenforceable under
211
- any particular circumstance, the balance of the section is intended to
212
- apply and the section as a whole is intended to apply in other
213
- circumstances.
214
-
215
- It is not the purpose of this section to induce you to infringe any
216
- patents or other property right claims or to contest validity of any
217
- such claims; this section has the sole purpose of protecting the
218
- integrity of the free software distribution system, which is
219
- implemented by public license practices. Many people have made
220
- generous contributions to the wide range of software distributed
221
- through that system in reliance on consistent application of that
222
- system; it is up to the author/donor to decide if he or she is willing
223
- to distribute software through any other system and a licensee cannot
224
- impose that choice.
225
-
226
- This section is intended to make thoroughly clear what is believed to
227
- be a consequence of the rest of this License.
228
-
229
- 8. If the distribution and/or use of the Program is restricted in
230
- certain countries either by patents or by copyrighted interfaces, the
231
- original copyright holder who places the Program under this License
232
- may add an explicit geographical distribution limitation excluding
233
- those countries, so that distribution is permitted only in or among
234
- countries not thus excluded. In such case, this License incorporates
235
- the limitation as if written in the body of this License.
236
-
237
- 9. The Free Software Foundation may publish revised and/or new versions
238
- of the General Public License from time to time. Such new versions will
239
- be similar in spirit to the present version, but may differ in detail to
240
- address new problems or concerns.
241
-
242
- Each version is given a distinguishing version number. If the Program
243
- specifies a version number of this License which applies to it and "any
244
- later version", you have the option of following the terms and conditions
245
- either of that version or of any later version published by the Free
246
- Software Foundation. If the Program does not specify a version number of
247
- this License, you may choose any version ever published by the Free Software
248
- Foundation.
249
-
250
- 10. If you wish to incorporate parts of the Program into other free
251
- programs whose distribution conditions are different, write to the author
252
- to ask for permission. For software which is copyrighted by the Free
253
- Software Foundation, write to the Free Software Foundation; we sometimes
254
- make exceptions for this. Our decision will be guided by the two goals
255
- of preserving the free status of all derivatives of our free software and
256
- of promoting the sharing and reuse of software generally.
257
-
258
- NO WARRANTY
259
-
260
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261
- FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262
- OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263
- PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264
- OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265
- MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266
- TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267
- PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268
- REPAIR OR CORRECTION.
269
-
270
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271
- WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272
- REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273
- INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274
- OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275
- TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276
- YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277
- PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278
- POSSIBILITY OF SUCH DAMAGES.
279
-
280
- END OF TERMS AND CONDITIONS
281
-
282
- How to Apply These Terms to Your New Programs
283
-
284
- If you develop a new program, and you want it to be of the greatest
285
- possible use to the public, the best way to achieve this is to make it
286
- free software which everyone can redistribute and change under these terms.
287
-
288
- To do so, attach the following notices to the program. It is safest
289
- to attach them to the start of each source file to most effectively
290
- convey the exclusion of warranty; and each file should have at least
291
- the "copyright" line and a pointer to where the full notice is found.
292
-
293
- <one line to give the program's name and a brief idea of what it does.>
294
- Copyright (C) 19yy <name of author>
295
-
296
- This program is free software; you can redistribute it and/or modify
297
- it under the terms of the GNU General Public License as published by
298
- the Free Software Foundation; either version 2 of the License, or
299
- (at your option) any later version.
300
-
301
- This program is distributed in the hope that it will be useful,
302
- but WITHOUT ANY WARRANTY; without even the implied warranty of
303
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304
- GNU General Public License for more details.
305
-
306
- You should have received a copy of the GNU General Public License
307
- along with this program; if not, write to the Free Software
308
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
309
-
310
-
311
- Also add information on how to contact you by electronic and paper mail.
312
-
313
- If the program is interactive, make it output a short notice like this
314
- when it starts in an interactive mode:
315
-
316
- Gnomovision version 69, Copyright (C) 19yy name of author
317
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
318
- This is free software, and you are welcome to redistribute it
319
- under certain conditions; type `show c' for details.
320
-
321
- The hypothetical commands `show w' and `show c' should show the appropriate
322
- parts of the General Public License. Of course, the commands you use may
323
- be called something other than `show w' and `show c'; they could even be
324
- mouse-clicks or menu items--whatever suits your program.
325
-
326
- You should also get your employer (if you work as a programmer) or your
327
- school, if any, to sign a "copyright disclaimer" for the program, if
328
- necessary. Here is a sample; alter the names:
329
-
330
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
331
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
332
-
333
- <signature of Ty Coon>, 1 April 1989
334
- Ty Coon, President of Vice
335
-
336
- This General Public License does not permit incorporating your program into
337
- proprietary programs. If your program is a subroutine library, you may
338
- consider it more useful to permit linking proprietary applications with the
339
- library. If this is what you want to do, use the GNU Library General
340
- Public License instead of this License.