rsox-command 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/lib/sox/stats.rb CHANGED
@@ -43,7 +43,6 @@ module Sox
43
43
  end
44
44
 
45
45
  def dump(attributes)
46
- puts "Save in #{cache_file}: #{attributes.inspect}"
47
46
  File.open(cache_file, "w") do |f|
48
47
  f.write YAML.dump(attributes)
49
48
  end
@@ -89,6 +88,10 @@ module Sox
89
88
  attributes['RMS Pk dB']
90
89
  end
91
90
 
91
+ def peak_level
92
+ attributes['Pk lev dB']
93
+ end
94
+
92
95
  def silent?
93
96
  rms_peak < -45
94
97
  end
data/rsox-command.gemspec CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "rsox-command"
6
- s.version = "0.0.2"
6
+ s.version = "0.0.3"
7
7
  s.authors = ["Alban Peignier"]
8
8
  s.email = ["alban@tryphon.eu"]
9
9
  s.homepage = "http://projects.tryphon.eu/rsox-command"
@@ -73,5 +73,14 @@ describe Sox::Stats do
73
73
  end
74
74
 
75
75
  end
76
+
77
+ describe "peak_level" do
78
+
79
+ it "should return 'Pk lev dB' found by sox" do
80
+ subject.stub :attributes => { 'Pk lev dB' => -3.0 }
81
+ subject.peak_level.should == -3.0
82
+ end
83
+
84
+ end
76
85
 
77
86
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rsox-command
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
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
  - Alban Peignier
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-05-30 00:00:00 Z
18
+ date: 2012-06-03 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  prerelease: false