MINT-sdl 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
File without changes
data/Gemfile ADDED
@@ -0,0 +1,14 @@
1
+ source :rubygems
2
+ gem "MINT-scxml", "1.0.0"
3
+ gem "MINT-statemachine", "1.2.3"
4
+ gem "MINT-core", "1.0.0"
5
+ gem "rspec", "1.3.1"
6
+ gem "dm-core","0.10.2"
7
+ gem "dm-rinda-adapter" , "0.1.2"
8
+ gem "rake","0.9.2"
9
+ gem "dm-types","0.10.2"
10
+ gem "wxruby","2.0.0"
11
+ gem "rmagick","2.13.1"
12
+ gem "eventmachine", "0.12.10"
13
+ gem "hoe", "2.9.6"
14
+ gem "rubysdl","2.1.1"
@@ -0,0 +1,56 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ MINT-core (1.0.0)
5
+ MINT-statemachine (~> 1.2.2)
6
+ cassowary (~> 1.0.0)
7
+ dm-rinda-adapter (~> 0.1.0)
8
+ MINT-scxml (1.0.0)
9
+ MINT-statemachine (~> 1.2.3)
10
+ MINT-statemachine (1.2.3)
11
+ addressable (2.2.6)
12
+ bcrypt-ruby (2.1.4)
13
+ cassowary (1.0.0)
14
+ dm-core (0.10.2)
15
+ addressable (~> 2.1)
16
+ extlib (~> 0.9.14)
17
+ dm-rinda-adapter (0.1.2)
18
+ dm-core (~> 0.10.2)
19
+ dm-types (0.10.2)
20
+ bcrypt-ruby (~> 2.1.2)
21
+ dm-core (~> 0.10.2)
22
+ fastercsv (~> 1.5.0)
23
+ json_pure (~> 1.2.0)
24
+ stringex (~> 1.1.0)
25
+ uuidtools (~> 2.1.1)
26
+ eventmachine (0.12.10)
27
+ extlib (0.9.15)
28
+ fastercsv (1.5.4)
29
+ hoe (2.9.6)
30
+ rake (~> 0.8)
31
+ json_pure (1.2.4)
32
+ rake (0.9.2)
33
+ rmagick (2.13.1)
34
+ rspec (1.3.1)
35
+ rubysdl (2.1.1)
36
+ stringex (1.1.0)
37
+ uuidtools (2.1.2)
38
+ wxruby (2.0.0)
39
+
40
+ PLATFORMS
41
+ ruby
42
+
43
+ DEPENDENCIES
44
+ MINT-core (= 1.0.0)
45
+ MINT-scxml (= 1.0.0)
46
+ MINT-statemachine (= 1.2.3)
47
+ dm-core (= 0.10.2)
48
+ dm-rinda-adapter (= 0.1.2)
49
+ dm-types (= 0.10.2)
50
+ eventmachine (= 0.12.10)
51
+ hoe (= 2.9.6)
52
+ rake (= 0.9.2)
53
+ rmagick (= 2.13.1)
54
+ rspec (= 1.3.1)
55
+ rubysdl (= 2.1.1)
56
+ wxruby (= 2.0.0)
@@ -0,0 +1,11 @@
1
+ === 1.0.0 / 2011-11-01
2
+
3
+ * First version
4
+
5
+ === 1.0.1 / 2011-11-01
6
+
7
+ * fixed wrong dependency to MINT-core
8
+
9
+ === 1.0.2 / 2011-11-01
10
+
11
+ * no changes
@@ -0,0 +1,42 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{MINT-sdl}
5
+ s.version = "1.0.0"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
+ s.authors = [%q{Sebastian Feuerstack}]
9
+ s.date = %q{2011-11-02}
10
+ s.description = %q{Multimodal Interaction Framework sound support
11
+
12
+ Implements an agent that offers sound support.}
13
+ s.email = [%q{Sebastian@Feuerstack.org}]
14
+ s.executables = [%q{mint-sdl-sound}]
15
+ s.extra_rdoc_files = [%q{History.txt}, %q{Manifest.txt}]
16
+ s.files = [%q{Gemfile}, %q{Gemfile.lock}, %q{History.txt}, %q{MINT-sdl.gemspec}, %q{Manifest.txt}, %q{README.rdoc}, %q{Rakefile}, %q{bin/mint-sdl-sound}, %q{lib/MINT-sdl.rb}, %q{lib/MINT-sdl/sound.rb}, %q{lib/MINT-sdl/sounds/click.wav}, %q{lib/MINT-sdl/sounds/click1.wav}, %q{lib/MINT-sdl/sounds/plop.wav}, %q{lib/MINT-sdl/sounds/plop2.wav}, %q{lib/MINT-sdl/sounds/windup.wav}, %q{lib/MINT-sdl/sounds/zoom.wav}, %q{test/test_MINT-sdl.rb}, %q{.gemtest}]
17
+ s.homepage = %q{http://www.multi-access.de}
18
+ s.rdoc_options = [%q{--main}, %q{README.rdoc}]
19
+ s.require_paths = [%q{lib}]
20
+ s.rubyforge_project = %q{MINT-sdl}
21
+ s.rubygems_version = %q{1.8.5}
22
+ s.summary = %q{Multimodal Interaction Framework sound support Implements an agent that offers sound support.}
23
+ s.test_files = [%q{test/test_MINT-sdl.rb}]
24
+
25
+ if s.respond_to? :specification_version then
26
+ s.specification_version = 3
27
+
28
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
29
+ s.add_runtime_dependency(%q<MINT-core>, ["~> 1.0.0"])
30
+ s.add_runtime_dependency(%q<rubysdl>, ["~> 2.1.1"])
31
+ s.add_development_dependency(%q<hoe>, ["~> 2.9"])
32
+ else
33
+ s.add_dependency(%q<MINT-core>, ["~> 1.0.0"])
34
+ s.add_dependency(%q<rubysdl>, ["~> 2.1.1"])
35
+ s.add_dependency(%q<hoe>, ["~> 2.9"])
36
+ end
37
+ else
38
+ s.add_dependency(%q<MINT-core>, ["~> 1.0.0"])
39
+ s.add_dependency(%q<rubysdl>, ["~> 2.1.1"])
40
+ s.add_dependency(%q<hoe>, ["~> 2.9"])
41
+ end
42
+ end
@@ -0,0 +1,17 @@
1
+ Gemfile
2
+ Gemfile.lock
3
+ History.txt
4
+ MINT-sdl.gemspec
5
+ Manifest.txt
6
+ README.rdoc
7
+ Rakefile
8
+ bin/mint-sdl-sound
9
+ lib/MINT-sdl.rb
10
+ lib/MINT-sdl/sound.rb
11
+ lib/MINT-sdl/sounds/click.wav
12
+ lib/MINT-sdl/sounds/click1.wav
13
+ lib/MINT-sdl/sounds/plop.wav
14
+ lib/MINT-sdl/sounds/plop2.wav
15
+ lib/MINT-sdl/sounds/windup.wav
16
+ lib/MINT-sdl/sounds/zoom.wav
17
+ test/test_MINT-sdl.rb
@@ -0,0 +1,63 @@
1
+ = MINT-sdl
2
+
3
+ * http://www.multi-access.de
4
+
5
+ == DESCRIPTION:
6
+
7
+ Multimodal Interaction Framework sound support
8
+
9
+ Implements an agent that offers sound support.
10
+
11
+ == FEATURES/PROBLEMS:
12
+
13
+ * Still alpha - it runs on our machines...
14
+
15
+ == SYNOPSIS:
16
+
17
+ Just start the sound agent.
18
+
19
+ == REQUIREMENTS:
20
+
21
+ Requires libsdl, wxruby, libmagick
22
+
23
+ The easiest way to use it is just to install the following packages on your ubuntu 10.04 LTS machine:
24
+
25
+ sudo apt-get install build-essential libsdl-dev libsdl-mixer1.2-dev libmagickcore-dev libmagickwand-dev libwxbase2.8-0 libwxgtk2.8-0
26
+
27
+ == INSTALL:
28
+
29
+ gem install MINT-sdl
30
+
31
+ == DEVELOPERS:
32
+
33
+ After checking out the source, run:
34
+
35
+ $ rake newb
36
+
37
+ This task will install any missing dependencies, run the tests/specs,
38
+ and generate the RDoc.
39
+
40
+ == LICENSE:
41
+
42
+ (The MIT License)
43
+
44
+ Copyright (c) 2011 Sebastian Feuerstack
45
+
46
+ Permission is hereby granted, free of charge, to any person obtaining
47
+ a copy of this software and associated documentation files (the
48
+ 'Software'), to deal in the Software without restriction, including
49
+ without limitation the rights to use, copy, modify, merge, publish,
50
+ distribute, sublicense, and/or sell copies of the Software, and to
51
+ permit persons to whom the Software is furnished to do so, subject to
52
+ the following conditions:
53
+
54
+ The above copyright notice and this permission notice shall be
55
+ included in all copies or substantial portions of the Software.
56
+
57
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
58
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
59
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
60
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
61
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
62
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
63
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,21 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'rubygems'
4
+ require 'hoe'
5
+
6
+ # Hoe.plugin :compiler
7
+ # Hoe.plugin :cucumberfeatures
8
+ # Hoe.plugin :gem_prelude_sucks
9
+ # Hoe.plugin :inline
10
+ # Hoe.plugin :manifest
11
+ Hoe.plugin :newgem
12
+ # Hoe.plugin :racc
13
+ # Hoe.plugin :rubyforge
14
+ # Hoe.plugin :website
15
+
16
+ Hoe.spec 'MINT-sdl' do
17
+ self.developer 'Sebastian Feuerstack', 'Sebastian@Feuerstack.org'
18
+ self.rubyforge_name = self.name # TODO this is default value
19
+ self.extra_deps = [['MINT-core','~> 1.0.0'],
20
+ ['rubysdl',"~>2.1.1"]]
21
+ end
@@ -0,0 +1,33 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
4
+ require 'rubygems'
5
+ require 'MINT-core'
6
+ require 'MINT-sdl/sound'
7
+
8
+ include MINT
9
+
10
+ s = SoundAgent.new
11
+
12
+ mapping_external_focus_click = ExecuteOnStateChange.new(AIO,"focused",s.method(:play_click))
13
+ s.addMapping(mapping_external_focus_click)
14
+ mapping_external_select = ExecuteOnStateChange.new(HandGesture,"selected",s.method(:play_click2))
15
+ s.addMapping(mapping_external_select)
16
+ mapping_external_confirm = ExecuteOnStateChange.new(HandGesture,"confirmed",s.method(:play_plop))
17
+ s.addMapping(mapping_external_confirm)
18
+
19
+
20
+ #drag and drop gestures
21
+ mapping_external_selected = ExecuteOnStateChange.new(GestureButton,"released",s.method(:play_click2))
22
+ s.addMapping(mapping_external_selected)
23
+ mapping_external_pressed = ExecuteOnStateChange.new(GestureButton,"pressed",s.method(:play_plop))
24
+ s.addMapping(mapping_external_pressed)
25
+
26
+
27
+ #mapping_external_select = ExecuteOnStateChange.new(AIINChoose,"chosen",s.method(:play_click2))
28
+ #s.addMapping(mapping_external_select)
29
+ #mapping_external_narrowing = ExecuteOnStateChange.new(HandGesture,"narrowing",s.method(:play_windup))
30
+ #s.addMapping(mapping_external_narrowing)
31
+ #mapping_external_widening = ExecuteOnStateChange.new(HandGesture,"widening",s.method(:play_windup))
32
+ #s.addMapping(mapping_external_widening)
33
+ s.run
@@ -0,0 +1,13 @@
1
+ $:.unshift(File.dirname(__FILE__)) unless
2
+ $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
3
+
4
+ module MINTSdl
5
+ VERSION = '1.0.2'
6
+ end
7
+
8
+ require 'rubygems'
9
+ require "bundler/setup"
10
+ require 'MINT-core'
11
+ require 'sdl'
12
+
13
+ require "MINT-sdl/sound"
@@ -0,0 +1,37 @@
1
+ include MINT
2
+
3
+ class SoundAgent < Agent
4
+
5
+ def initialize
6
+ SDL::init(SDL::INIT_AUDIO)
7
+ SDL::Mixer.open(22050, SDL::Mixer::DEFAULT_FORMAT, 2, 512)
8
+ @zoom = SDL::Mixer::Wave.load(File.join(File.dirname(__FILE__), "sounds", "click1.wav"))
9
+ @click2 = SDL::Mixer::Wave.load(File.join(File.dirname(__FILE__), "sounds","click.wav"))
10
+ @plop = SDL::Mixer::Wave.load(File.join(File.dirname(__FILE__), "sounds","plop.wav"))
11
+ @windup = SDL::Mixer::Wave.load(File.join(File.dirname(__FILE__), "sounds","windup.wav"))
12
+ super
13
+ end
14
+
15
+ def play_click(result)
16
+ # STDOUT.puts " in play"
17
+ SDL::Mixer.play_channel(0, @zoom, 0)
18
+ end
19
+
20
+ def play_click2(result)
21
+ # STDOUT.puts " in play"
22
+ SDL::Mixer.play_channel(0, @click2, 0)
23
+ end
24
+
25
+ def play_plop(result)
26
+ SDL::Mixer.play_channel(0, @plop, 0)
27
+ end
28
+
29
+ def play_windup(result)
30
+ SDL::Mixer.play_channel(0, @windup, 0)
31
+ end
32
+
33
+
34
+ end
35
+
36
+
37
+
@@ -0,0 +1,8 @@
1
+ require "test/unit"
2
+ require "MINT-sdl"
3
+
4
+ class TestMINT_sdl < Test::Unit::TestCase
5
+ def test_sanity
6
+
7
+ end
8
+ end
metadata ADDED
@@ -0,0 +1,134 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: MINT-sdl
3
+ version: !ruby/object:Gem::Version
4
+ hash: 19
5
+ prerelease:
6
+ segments:
7
+ - 1
8
+ - 0
9
+ - 2
10
+ version: 1.0.2
11
+ platform: ruby
12
+ authors:
13
+ - Sebastian Feuerstack
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-11-02 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: MINT-core
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ~>
27
+ - !ruby/object:Gem::Version
28
+ hash: 23
29
+ segments:
30
+ - 1
31
+ - 0
32
+ - 0
33
+ version: 1.0.0
34
+ type: :runtime
35
+ version_requirements: *id001
36
+ - !ruby/object:Gem::Dependency
37
+ name: rubysdl
38
+ prerelease: false
39
+ requirement: &id002 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ~>
43
+ - !ruby/object:Gem::Version
44
+ hash: 9
45
+ segments:
46
+ - 2
47
+ - 1
48
+ - 1
49
+ version: 2.1.1
50
+ type: :runtime
51
+ version_requirements: *id002
52
+ - !ruby/object:Gem::Dependency
53
+ name: hoe
54
+ prerelease: false
55
+ requirement: &id003 !ruby/object:Gem::Requirement
56
+ none: false
57
+ requirements:
58
+ - - ~>
59
+ - !ruby/object:Gem::Version
60
+ hash: 17
61
+ segments:
62
+ - 2
63
+ - 9
64
+ version: "2.9"
65
+ type: :development
66
+ version_requirements: *id003
67
+ description: |-
68
+ Multimodal Interaction Framework sound support
69
+
70
+ Implements an agent that offers sound support.
71
+ email:
72
+ - Sebastian@Feuerstack.org
73
+ executables:
74
+ - mint-sdl-sound
75
+ extensions: []
76
+
77
+ extra_rdoc_files:
78
+ - History.txt
79
+ - Manifest.txt
80
+ files:
81
+ - Gemfile
82
+ - Gemfile.lock
83
+ - History.txt
84
+ - MINT-sdl.gemspec
85
+ - Manifest.txt
86
+ - README.rdoc
87
+ - Rakefile
88
+ - bin/mint-sdl-sound
89
+ - lib/MINT-sdl.rb
90
+ - lib/MINT-sdl/sound.rb
91
+ - lib/MINT-sdl/sounds/click.wav
92
+ - lib/MINT-sdl/sounds/click1.wav
93
+ - lib/MINT-sdl/sounds/plop.wav
94
+ - lib/MINT-sdl/sounds/plop2.wav
95
+ - lib/MINT-sdl/sounds/windup.wav
96
+ - lib/MINT-sdl/sounds/zoom.wav
97
+ - test/test_MINT-sdl.rb
98
+ - .gemtest
99
+ homepage: http://www.multi-access.de
100
+ licenses: []
101
+
102
+ post_install_message:
103
+ rdoc_options:
104
+ - --main
105
+ - README.rdoc
106
+ require_paths:
107
+ - lib
108
+ required_ruby_version: !ruby/object:Gem::Requirement
109
+ none: false
110
+ requirements:
111
+ - - ">="
112
+ - !ruby/object:Gem::Version
113
+ hash: 3
114
+ segments:
115
+ - 0
116
+ version: "0"
117
+ required_rubygems_version: !ruby/object:Gem::Requirement
118
+ none: false
119
+ requirements:
120
+ - - ">="
121
+ - !ruby/object:Gem::Version
122
+ hash: 3
123
+ segments:
124
+ - 0
125
+ version: "0"
126
+ requirements: []
127
+
128
+ rubyforge_project: MINT-sdl
129
+ rubygems_version: 1.8.5
130
+ signing_key:
131
+ specification_version: 3
132
+ summary: Multimodal Interaction Framework sound support Implements an agent that offers sound support.
133
+ test_files:
134
+ - test/test_MINT-sdl.rb