audio_monster 1.1.1 → 1.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ee6a6d54a9be1fe804fef3d6f248066b8af51888
4
- data.tar.gz: 196826c589e41707836169f3116edc96ac0a375a
3
+ metadata.gz: 3a057b2a1f3a759502c32a054151db67b29c7f94
4
+ data.tar.gz: 8dc01f649e809dedc68c1530bc58a591071cf32b
5
5
  SHA512:
6
- metadata.gz: 0e61b152c02ce429b65919c7e765f4bea45212c199df726dbac44c1f1be8c951695e7d9544dac47ad98861eeef7ed8e5d0b046ac729dbb22ccdad21be5d7dac5
7
- data.tar.gz: 8704767e08fa6d0d373cd4e21b372435d30de56818eeec57b0062d44526ea9595b3d34ffdf4db320b68fc01d43f2385a0f5ad10aa12c4c0b7c5afbde04af9847
6
+ metadata.gz: 228c4f3616a61b1e9bb0fa49baf2e8ae4dbac65f2c13916d4b121f196f1ae5272c3382f5f65944e7dfd09014ce6fdfd3eacf2aa958bda5dd74335696ac557fe3
7
+ data.tar.gz: f433d041ae8ea1d4ba0c964ebd6bb879e8ea48b77b436c104b0ed93995b2c53f7e1ef274fc772a2c1eee14ad302d591c5f756969bc0d1e0b9fa6fdba44820783
@@ -619,8 +619,8 @@ module AudioMonster
619
619
  wav_info = info_for_wav(wav_path)
620
620
  logger.debug "cut_wav: wav_info:#{wav_info.inspect}"
621
621
 
622
- new_length = [wav_info[:length].to_i, length].min
623
- fade_length = [wav_info[:length].to_i, fade].min
622
+ new_length = [wav_info[:length].to_f, length.to_f].min
623
+ fade_length = [wav_info[:length].to_f, fade.to_f].min
624
624
 
625
625
  # find out if the wav file is stereo or mono as this needs to match the starting wav
626
626
  channels = wav_info[:channel_mode] == 'Mono' ? 1 : 2
@@ -1,5 +1,5 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
 
3
3
  module AudioMonster
4
- VERSION = "1.1.1"
4
+ VERSION = "1.1.2"
5
5
  end
data/test/monster_test.rb CHANGED
@@ -117,6 +117,12 @@ describe AudioMonster::Monster do
117
117
  slice_wav.duration.must_equal 5
118
118
  end
119
119
 
120
+ it 'can cut a section from the top of an audio file' do
121
+ monster.cut_wav(in_file('test_long.wav'), out_file('cut.wav'), '5', 1).wont_be_nil
122
+ cut_wav = NuWav::WaveFile.parse(out_file('cut.wav'))
123
+ cut_wav.duration.must_equal 5
124
+ end
125
+
120
126
  it 'can create a temp file with a really long name' do
121
127
  base_file_name = ('abc' * 100) + '.extension'
122
128
  file = AudioMonster.create_temp_file(base_file_name)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: audio_monster
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kuklewicz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-24 00:00:00.000000000 Z
11
+ date: 2015-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nu_wav