typecast-ruby 0.1.10 → 0.1.11

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
  SHA256:
3
- metadata.gz: 41b4085ac984161649beeb512ae32d72eefb823445e42fbedc8f36b234ba0291
4
- data.tar.gz: d838ce170ebf9aa1011c8014e8851f7488192287bfacd217ce61d8003c2ff4a3
3
+ metadata.gz: eca399615eb6a742c1a08ee80bf61ad3c03a30a2225b895275da6bac9f6398ea
4
+ data.tar.gz: 62fce2fe688c24b6e9b0860123db60e624a35aacc01ac6763a20ba507325e822
5
5
  SHA512:
6
- metadata.gz: b66406928f01c849dbc897a9bf3b6360d0ae7fc9293170e2a3fd57b602a97e29ecbd34d7965081facb8710a9cdae7f2aed87fcfe8c7b9ca3d1644e07c73e80cb
7
- data.tar.gz: 03ebe4faca1ded5e58377110feffbe0fd0beeb4ea687871eb980562e957662738f6179d98dcc2fc82c4cc8ad5d5fe47a9395181caad7452daa9fb6c247996af5
6
+ metadata.gz: 7c19aa000d956bc9022cb4099ecc9d7d11c9b70a3197c95eccc46f38aadf0817c31d2425175b933c1c8b169c1c797e014e9216829a2d0c32e11d718e70351526
7
+ data.tar.gz: 5760fc399813e6241439aa5b48c272b9210d5e19d388a48d323d04f282f4cdbfb537b7d7e2ad12381d99c38e3034f75a1bd56f027f6abc0f4cd496fb7208f64d
@@ -13,9 +13,13 @@ module Typecast
13
13
  ].freeze
14
14
 
15
15
  class Output
16
- attr_reader :volume, :target_lufs, :audio_pitch, :audio_tempo, :audio_format
16
+ attr_reader :volume, :target_lufs, :audio_pitch, :audio_tempo, :audio_format, :remove_silence_ms
17
17
 
18
- def initialize(volume: nil, target_lufs: nil, audio_pitch: nil, audio_tempo: nil, audio_format: nil)
18
+ def initialize(volume: nil, target_lufs: nil, audio_pitch: nil, audio_tempo: nil, audio_format: nil, remove_silence_ms: nil)
19
+ unless remove_silence_ms.nil? || (remove_silence_ms.is_a?(Integer) && (0..1000).cover?(remove_silence_ms))
20
+ raise ArgumentError, "remove_silence_ms must be an integer between 0 and 1000"
21
+ end
22
+ @remove_silence_ms = remove_silence_ms
19
23
  @volume = volume
20
24
  @target_lufs = target_lufs
21
25
  @audio_pitch = audio_pitch
@@ -26,6 +30,7 @@ module Typecast
26
30
  def to_h
27
31
  Models.compact(
28
32
  volume: volume,
33
+ remove_silence_ms: remove_silence_ms,
29
34
  target_lufs: target_lufs,
30
35
  audio_pitch: audio_pitch,
31
36
  audio_tempo: audio_tempo,
@@ -35,9 +40,13 @@ module Typecast
35
40
  end
36
41
 
37
42
  class OutputStream
38
- attr_reader :audio_pitch, :audio_tempo, :audio_format, :target_lufs
43
+ attr_reader :audio_pitch, :audio_tempo, :audio_format, :target_lufs, :remove_silence_ms
39
44
 
40
- def initialize(audio_pitch: nil, audio_tempo: nil, audio_format: nil, target_lufs: nil)
45
+ def initialize(audio_pitch: nil, audio_tempo: nil, audio_format: nil, target_lufs: nil, remove_silence_ms: nil)
46
+ unless remove_silence_ms.nil? || (remove_silence_ms.is_a?(Integer) && (0..1000).cover?(remove_silence_ms))
47
+ raise ArgumentError, "remove_silence_ms must be an integer between 0 and 1000"
48
+ end
49
+ @remove_silence_ms = remove_silence_ms
41
50
  @audio_pitch = audio_pitch
42
51
  @audio_tempo = audio_tempo
43
52
  @audio_format = audio_format
@@ -49,7 +58,8 @@ module Typecast
49
58
  audio_pitch: audio_pitch,
50
59
  audio_tempo: audio_tempo,
51
60
  audio_format: audio_format,
52
- target_lufs: target_lufs
61
+ target_lufs: target_lufs,
62
+ remove_silence_ms: remove_silence_ms
53
63
  )
54
64
  end
55
65
  end
@@ -1,3 +1,3 @@
1
1
  module Typecast
2
- VERSION = "0.1.10"
2
+ VERSION = "0.1.11"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: typecast-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Neosapience