audio_hero 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6b52f4b6ef149638cd081723427caa66e9a5135e
4
- data.tar.gz: d93e1f3397e9e45483314ab2eb49fd91f17b132e
3
+ metadata.gz: 9c2302def47bb3bce747a181e0caf71bd92530fd
4
+ data.tar.gz: 1fbee736d23e738c3af37de7a94e027ff6484ec2
5
5
  SHA512:
6
- metadata.gz: ab0d60958cc93d2d948afb56e006760dd6f73850a0aa60437d0ae9fb3ae03b70a87cda234007287f4b7a01f63a2daccd181caf522b9a1a41cc504b09c88162a1
7
- data.tar.gz: b597a5b6b05573deaa230d86e78ac69b56cd9169cb2e848fc6afc9e4b21fbddf1476f482eb2f916673698eee3a9006cee5d2b43f297781e4c289c07229558566
6
+ metadata.gz: fe98aaa5ee92c8ade032260220062b4522d53f60432220a78035584670df58f759db248fb454c24b360083ce5d7a2fc04df09f29a942e2572019a8ff867c6651
7
+ data.tar.gz: e07d8ea56a688022dcd3fe3a1900a71d647a52fc025c5211f3649a3cf325d04b1efe36bb1b28fdf2d6395e67147d0e23f659c5172384ed58b316f4ba24a51f96
data/README.md CHANGED
@@ -73,7 +73,6 @@ Options(hash):
73
73
  * input_format (default to "mp3")
74
74
  * output_format (default to "wav")
75
75
  * output_filename (base filename, default to "out". If using custom version of SOX, use "%,1c" for starttime and use "%1,1c-%1,1d" for starttime-endtime as filename)
76
- * file2 (path to second audio file, I use this to split both channels of an audio file at one go, require a modified sox that will not overwrite file1's output. Eg. my modified sox output [milliseconds].wav instead of 001.wav)
77
76
  * gc (no default, set to "true" to auto close! input file)
78
77
 
79
78
  ###Stats
Binary file
@@ -1,3 +1,3 @@
1
1
  module AudioHero
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
data/lib/audio_hero.rb CHANGED
@@ -89,14 +89,14 @@ module AudioHero
89
89
  input_format = options[:input_format] ? options[:input_format] : "mp3"
90
90
  output_format = options[:output_format]
91
91
  output_filename = options[:output_filename] || "out"
92
- file2 = options[:file2]
92
+ # file2 = options[:file2]
93
93
  # Default to wav
94
94
  dir = Dir.mktmpdir
95
95
  format = output_format ? ".#{output_format}" : ".wav"
96
96
  dst = "#{dir}/#{output_filename}#{format}"
97
97
 
98
98
  src = @file
99
- src2 = file2
99
+ # src2 = file2 if file2
100
100
 
101
101
  begin
102
102
  parameters = []
@@ -106,11 +106,16 @@ module AudioHero
106
106
  parameters << effect
107
107
  parameters = parameters.flatten.compact.join(" ").strip.squeeze(" ")
108
108
  success = Cocaine::CommandLine.new("sox", parameters).run(:source => File.expand_path(src.path), :dest => dst)
109
- success = Cocaine::CommandLine.new("sox", parameters).run(:source => File.expand_path(src2.path), :dest => dst) if src2
109
+ # success = Cocaine::CommandLine.new("sox", parameters).run(:source => File.expand_path(src2.path), :dest => dst) if src2
110
110
  rescue => e
111
111
  raise AudioHeroError, "There was an error splitting #{@basename}"
112
112
  end
113
- src.close! && src2.close! if options[:gc] == "true"
113
+
114
+ if options[:gc] == "true"
115
+ src.close!
116
+ # src2.close! if src2
117
+ end
118
+
114
119
  Dir["#{dir}/**/*#{format}"]
115
120
  end
116
121
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: audio_hero
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - litenup
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-16 00:00:00.000000000 Z
11
+ date: 2016-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -99,6 +99,7 @@ files:
99
99
  - audio_hero-0.1.1.gem
100
100
  - audio_hero-0.1.2.gem
101
101
  - audio_hero-0.1.3.gem
102
+ - audio_hero-0.1.4.gem
102
103
  - audio_hero.gemspec
103
104
  - bin/console
104
105
  - bin/setup