tsunami 0.0.1 → 0.0.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.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/tsunami.rb +5 -7
  3. data/tsunami.gemspec +1 -1
  4. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1
1
+ 0.0.2
data/lib/tsunami.rb CHANGED
@@ -5,18 +5,16 @@ require 'narray'
5
5
 
6
6
  class Tsunami
7
7
 
8
- def initialize audio_file, image_file
8
+ def initialize audio_file
9
9
  # graph parameters
10
10
  @bitrate = '500'
11
11
  @offset = 5
12
12
  @audio_file = audio_file
13
- @image_file = image_file
14
13
  end
15
14
 
16
- def create_waveform_image(width, height)
17
- @size = width
18
- @width = width
19
- @height = height
15
+ def create_waveform(image_file, options)
16
+ @width = options[:width].to_i || 100
17
+ @height = options[:height].to_i || 50
20
18
 
21
19
  buckets = fill_buckets
22
20
 
@@ -28,7 +26,7 @@ class Tsunami
28
26
  # canvas = Magick::ImageList.new('images/waveform.png')
29
27
  gc.draw(canvas)
30
28
 
31
- canvas.write(@image_file)
29
+ canvas.write(image_file)
32
30
  end
33
31
 
34
32
  #fill the buckets
data/tsunami.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{tsunami}
8
- s.version = "0.0.1"
8
+ s.version = "0.0.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Andrei Bocan"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tsunami
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrei Bocan