ruby-openal 0.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.
@@ -0,0 +1,67 @@
1
+ #!/usr/bin/env ruby
2
+ ## ageldama 2007-04-01 16:24:14
3
+ require 'openal'
4
+ require 'test/unit'
5
+
6
+
7
+ class RubyOpenALTestCase < Test::Unit::TestCase
8
+ def setup
9
+ @device = ALC::Device.new
10
+ @context = ALC::Context.new @device
11
+ @context.make_current
12
+ end
13
+
14
+ def test_AL
15
+ ## errors, enums
16
+ assert(AL::get_error == AL::NO_ERROR)
17
+ assert(AL::OUT_OF_MEMORY == AL::enum_value_of('AL_OUT_OF_MEMORY'))
18
+ ## feature?
19
+ AL::disable(AL::DISTANCE_MODEL)
20
+ assert(AL::enable?(AL::DISTANCE_MODEL) == false)
21
+ AL::get_error
22
+ ## doppler-factor
23
+ AL::doppler_factor=3.14
24
+ #puts AL::float(AL::DOPPLER_FACTOR)
25
+ end
26
+
27
+ def test_hello
28
+ @buf_hello = AL::Buffer.load_hello_world
29
+ assert(@buf_hello != nil)
30
+ assert(@buf_hello.size > 0)
31
+ @src = AL::Source.new
32
+ assert(@src != nil)
33
+ @src.attach(@buf_hello)
34
+ @src.play
35
+ ##ALUT::sleep 3
36
+ end
37
+
38
+ def test_ALC_Device
39
+ assert(@device != nil)
40
+ assert(@device.get_error == ALC::NO_ERROR)
41
+ assert(@device.enum_value_of('ALC_OUT_OF_MEMORY') == ALC::OUT_OF_MEMORY)
42
+ end
43
+
44
+ def test_ALC_Context
45
+ assert(@context != nil)
46
+ assert(ALC::Context.current != nil)
47
+ assert(ALC::Context.current == @context)
48
+ assert(@context.device == @device)
49
+ end
50
+
51
+ def test_ALUT_init
52
+ assert(ALUT::init_without_context)
53
+ assert(ALUT::get_error == ALUT::ERROR_NO_ERROR);
54
+ assert(ALUT::get_error_string(ALUT::get_error) \
55
+ == ALUT::get_error_string(ALUT::ERROR_NO_ERROR))
56
+ #ALUT::sleep(1)
57
+ # TODO: test 'mime_types'
58
+ end
59
+
60
+ def teardown
61
+ # some destruction here.
62
+ ##ALUT::exit
63
+ end
64
+
65
+ end
66
+
67
+ ##EOF
@@ -0,0 +1,67 @@
1
+ #!/usr/bin/env ruby
2
+ ## ageldama 2007-04-01 16:24:14
3
+ require 'openal'
4
+ require 'test/unit'
5
+
6
+
7
+ class RubyOpenALTestCase < Test::Unit::TestCase
8
+ def setup
9
+ @device = ALC::Device.new
10
+ @context = ALC::Context.new @device
11
+ @context.make_current
12
+ end
13
+
14
+ def test_AL
15
+ ## errors, enums
16
+ assert(AL::get_error == AL::NO_ERROR)
17
+ assert(AL::OUT_OF_MEMORY == AL::enum_value_of('AL_OUT_OF_MEMORY'))
18
+ ## feature?
19
+ AL::disable(AL::DISTANCE_MODEL)
20
+ assert(AL::enable?(AL::DISTANCE_MODEL) == false)
21
+ AL::get_error
22
+ ## doppler-factor
23
+ AL::doppler_factor=3.14
24
+ #puts AL::float(AL::DOPPLER_FACTOR)
25
+ end
26
+
27
+ def test_hello
28
+ @buf_hello = AL::Buffer.load_hello_world
29
+ assert(@buf_hello != nil)
30
+ assert(@buf_hello.size > 0)
31
+ @src = AL::Source.new
32
+ assert(@src != nil)
33
+ @src.attach(@buf_hello)
34
+ @src.play
35
+ ALUT::sleep 3
36
+ end
37
+
38
+ def test_ALC_Device
39
+ assert(@device != nil)
40
+ assert(@device.get_error == ALC::NO_ERROR)
41
+ assert(@device.enum_value_of('ALC_OUT_OF_MEMORY') == ALC::OUT_OF_MEMORY)
42
+ end
43
+
44
+ def test_ALC_Context
45
+ assert(@context != nil)
46
+ assert(ALC::Context.current != nil)
47
+ assert(ALC::Context.current == @context)
48
+ assert(@context.device == @device)
49
+ end
50
+
51
+ def test_ALUT_init
52
+ assert(ALUT::init_without_context)
53
+ assert(ALUT::get_error == ALUT::ERROR_NO_ERROR);
54
+ assert(ALUT::get_error_string(ALUT::get_error) \
55
+ == ALUT::get_error_string(ALUT::ERROR_NO_ERROR))
56
+ #ALUT::sleep(1)
57
+ # TODO: test 'mime_types'
58
+ end
59
+
60
+ def teardown
61
+ # some destruction here.
62
+ ##ALUT::exit
63
+ end
64
+
65
+ end
66
+
67
+ ##EOF
metadata ADDED
@@ -0,0 +1,72 @@
1
+ --- !ruby/object:Gem::Specification
2
+ rubygems_version: 0.9.2
3
+ specification_version: 1
4
+ name: ruby-openal
5
+ version: !ruby/object:Gem::Version
6
+ version: "0.1"
7
+ date: 2007-04-01 00:00:00 +09:00
8
+ summary: ruby-openal is a OpenAL Ruby binding. with ruby-openal, you can write sound effects in 3d space.
9
+ require_paths:
10
+ - lib
11
+ email: ageldama@gmail.com
12
+ homepage: http://rubyforge.org/projects/ruby-openal/
13
+ rubyforge_project: ruby-openal
14
+ description: ruby-openal is a OpenAL Ruby binding. with ruby-openal, you can write sound effects in 3d space.
15
+ autorequire: openal
16
+ default_executable:
17
+ bindir: bin
18
+ has_rdoc: false
19
+ required_ruby_version: !ruby/object:Gem::Version::Requirement
20
+ requirements:
21
+ - - ">"
22
+ - !ruby/object:Gem::Version
23
+ version: 0.0.0
24
+ version:
25
+ platform: ruby
26
+ signing_key:
27
+ cert_chain:
28
+ post_install_message:
29
+ authors:
30
+ - Yun, Jonghyouk
31
+ files:
32
+ - ext
33
+ - lib
34
+ - test
35
+ - setup.rb
36
+ - TODO
37
+ - ruby-openal.gemspec
38
+ - ext/openal
39
+ - ext/openal/MANIFEST
40
+ - ext/openal/extconf.rb
41
+ - ext/openal/openal.h
42
+ - ext/openal/openal.c
43
+ - ext/openal/openal_al.h
44
+ - ext/openal/openal_alc.h
45
+ - ext/openal/openal_alut.c
46
+ - ext/openal/openal_alc.c
47
+ - ext/openal/openal_alut.h
48
+ - ext/openal/openal_al.c
49
+ - ext/openal/mkmf.log
50
+ - ext/openal/Makefile
51
+ - ext/openal/openal.o
52
+ - ext/openal/openal_alut.o
53
+ - ext/openal/openal_alc.o
54
+ - ext/openal/openal_al.o
55
+ - ext/openal/openal.so
56
+ - lib/openal
57
+ - test/test_al.rb~
58
+ - test/test_al.rb
59
+ test_files:
60
+ - test/test_al.rb
61
+ rdoc_options: []
62
+
63
+ extra_rdoc_files: []
64
+
65
+ executables: []
66
+
67
+ extensions:
68
+ - ext/openal/extconf.rb
69
+ requirements: []
70
+
71
+ dependencies: []
72
+