easyaudio_utils 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/easyaudio_utils.rb +10 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d885918998007b7806797bd68d4d68580fdb76ff9d79fb0d66b1be971bb4f63b
|
4
|
+
data.tar.gz: 24b8a113c7ce820b33f584e572f3f30da60fd57206ccf7010c9e44074b983878
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a20e43975d41ff9b235885deef0d8cb19f8243edd4678843b9840ef05eed026403d6b2a876f087e93c2f1d5ed7ca7587dc447c7f37bab4b32b37235ce5df879
|
7
|
+
data.tar.gz: b1a06bf5e96d2ed82eac8d800f40c5aa0a3d869c758fa19c79ad43484c04240c9a2c39ad50ff892afd158ab6038a013de0411e21a71bfff9b1075a7e9f828d35
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/easyaudio_utils.rb
CHANGED
@@ -81,14 +81,20 @@ class EasyAudioUtils
|
|
81
81
|
|
82
82
|
alias concat concat_files
|
83
83
|
|
84
|
+
# convert either wav to ogg or ogg to wav
|
85
|
+
#
|
84
86
|
def convert()
|
85
87
|
|
86
88
|
if File.extname(@file_in) == '.ogg' then
|
87
89
|
ogg_to_wav() if File.extname(@file_out) == '.wav'
|
90
|
+
else
|
91
|
+
wav_to_ogg() if File.extname(@file_out) == '.ogg'
|
88
92
|
end
|
89
93
|
|
90
94
|
end
|
91
95
|
|
96
|
+
# cut a section of audio and save it to file
|
97
|
+
#
|
92
98
|
def cut(starttime, duration)
|
93
99
|
|
94
100
|
command = "avconv -i %s -ss %s -t %s %s" % \
|
@@ -150,6 +156,10 @@ class EasyAudioUtils
|
|
150
156
|
def ogg_to_wav()
|
151
157
|
`oggdec #{@file_in} #{@file_out}`
|
152
158
|
end
|
159
|
+
|
160
|
+
def ogg_to_wav()
|
161
|
+
`sox -V #{@file_in} #{@file_out}`
|
162
|
+
end
|
153
163
|
|
154
164
|
def run(command, show=false)
|
155
165
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easyaudio_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
iV3Y2C+RMq1lzH37GpnqYY/GbIvXMmQ7PO19tYLBCV/OUawXzR16PkiHVjIGnDyN
|
36
36
|
PaGqcnyxdoovIOkXQxqj5+Zd
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2020-08-
|
38
|
+
date: 2020-08-31 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: c32
|
metadata.gz.sig
CHANGED
Binary file
|