audio_stream 3.3.0 → 3.3.1

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: 0011df46c8c5a4ca83fac3301ca638940087710da3dd996382a354d9aa19596f
4
- data.tar.gz: d88cb6715119d98bd02ee980be8cf9446b3a729a8de5003cf77a0dc0f958501a
3
+ metadata.gz: f9a71bf8ae0557aa738fba37ec4012370b7c4547c0d70ae6f92fa0e650c9ccfa
4
+ data.tar.gz: c38edfff8d4467ce9a55721d5f14e79c531f6277612bcd05daa60a10894a5226
5
5
  SHA512:
6
- metadata.gz: 7059283b291c17fec85bcd40f194d8312a0f2539fe093a31268c5361f6a00517390a5d5c56df72cedb9dcc8432100a066834dee1fde4872039cf5adc2524c58c
7
- data.tar.gz: 55340551e2da2ce9dcd87c89261b71868687d30ab65167f05552402c10d2e227337ccc7bba0c5ae9c7ebc737e779fa85952fb3056db3a7b5a1a65423fcffeed2
6
+ metadata.gz: 6ba0e9f8bb7d349f574c97c70411d072cf4b3342755cdc9c3ccaae68bdb31c3a8e73dccab4b6893dd2ac0c5f981d0551a72fa4cbee8b525ca7c863388840e250
7
+ data.tar.gz: c1ce52d16e9024363b3a460e31cfbb30188724f1dc19859e6834b8e8d80d5d7430b1ca4fa0bd7ae1d0a985eab798c82bc4f7a541bc36d2770be2fa023d1f4551
@@ -8,6 +8,7 @@ module AudioStream
8
8
  end
9
9
 
10
10
  def sec(soundinfo)
11
+ return @sec if @sec
11
12
  sample(soundinfo).to_f / soundinfo.samplerate
12
13
  end
13
14
 
@@ -33,6 +34,11 @@ module AudioStream
33
34
  end
34
35
  end
35
36
 
37
+ def freq(soundinfo)
38
+ return @freq if @freq
39
+ soundinfo.samplerate.to_f / sample(soundinfo)
40
+ end
41
+
36
42
  def frame_phase(soundinfo)
37
43
  sample_phase(soundinfo) * soundinfo.window_size
38
44
  end
@@ -45,7 +51,7 @@ module AudioStream
45
51
  new(sec: v)
46
52
  end
47
53
 
48
- def self.millisec(v)
54
+ def self.msec(v)
49
55
  new(sec: v*0.001)
50
56
  end
51
57
 
@@ -1,3 +1,3 @@
1
1
  module AudioStream
2
- VERSION = "3.3.0"
2
+ VERSION = "3.3.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: audio_stream
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.0
4
+ version: 3.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoshida Tetsuya