audio_hero 0.1.4 → 0.1.5
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.
- checksums.yaml +4 -4
- data/README.md +0 -1
- data/audio_hero-0.1.4.gem +0 -0
- data/lib/audio_hero/version.rb +1 -1
- data/lib/audio_hero.rb +9 -4
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c2302def47bb3bce747a181e0caf71bd92530fd
|
4
|
+
data.tar.gz: 1fbee736d23e738c3af37de7a94e027ff6484ec2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/audio_hero/version.rb
CHANGED
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
|
-
|
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
|
+
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-
|
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
|