ruby-openal 0.1 → 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.
- data/ext/openal/mkmf.log +24 -66
- data/ext/openal/openal_al.c +1 -1
- data/ruby-openal.gemspec +1 -1
- metadata +12 -19
- data/ext/openal/Makefile +0 -149
- data/ext/openal/openal.o +0 -0
- data/ext/openal/openal.so +0 -0
- data/ext/openal/openal_al.o +0 -0
- data/ext/openal/openal_alc.o +0 -0
- data/ext/openal/openal_alut.o +0 -0
- data/test/test_al.rb~ +0 -67
data/ext/openal/mkmf.log
CHANGED
@@ -1,66 +1,24 @@
|
|
1
|
-
have_library: checking for alGetError() in
|
2
|
-
|
3
|
-
"
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
/* end */
|
14
|
-
|
15
|
-
"
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
--------------------
|
26
|
-
|
27
|
-
have_func: checking for snprintf()... -------------------- yes
|
28
|
-
|
29
|
-
"gcc -o conftest -I. -I/usr/lib/ruby/1.8/i486-linux -I/home/ageldama/my/ruby-openal/trunk/ext/openal -Wall -g -fno-strict-aliasing -O2 -fPIC conftest.c -L"/usr/lib" -rdynamic -Wl,-export-dynamic -lopenal -lruby1.8-static -lopenal -lpthread -ldl -lcrypt -lm -lc"
|
30
|
-
checked program was:
|
31
|
-
/* begin */
|
32
|
-
1: #include <stdio.h>
|
33
|
-
2:
|
34
|
-
3: /*top*/
|
35
|
-
4: int main() { return 0; }
|
36
|
-
5: int t() { void ((*volatile p)()); p = (void ((*)()))snprintf; return 0; }
|
37
|
-
/* end */
|
38
|
-
|
39
|
-
--------------------
|
40
|
-
|
41
|
-
have_library: checking for alutGetErrorString() in -lalut... -------------------- yes
|
42
|
-
|
43
|
-
"gcc -o conftest -I. -I/usr/lib/ruby/1.8/i486-linux -I/home/ageldama/my/ruby-openal/trunk/ext/openal -Wall -g -fno-strict-aliasing -O2 -fPIC conftest.c -L"/usr/lib" -rdynamic -Wl,-export-dynamic -lopenal -lruby1.8-static -lalut -lopenal -lpthread -ldl -lcrypt -lm -lc"
|
44
|
-
conftest.c: In function ‘t’:
|
45
|
-
conftest.c:3: error: ‘alutGetErrorString’ undeclared (first use in this function)
|
46
|
-
conftest.c:3: error: (Each undeclared identifier is reported only once
|
47
|
-
conftest.c:3: error: for each function it appears in.)
|
48
|
-
checked program was:
|
49
|
-
/* begin */
|
50
|
-
1: /*top*/
|
51
|
-
2: int main() { return 0; }
|
52
|
-
3: int t() { void ((*volatile p)()); p = (void ((*)()))alutGetErrorString; return 0; }
|
53
|
-
/* end */
|
54
|
-
|
55
|
-
"gcc -o conftest -I. -I/usr/lib/ruby/1.8/i486-linux -I/home/ageldama/my/ruby-openal/trunk/ext/openal -Wall -g -fno-strict-aliasing -O2 -fPIC conftest.c -L"/usr/lib" -rdynamic -Wl,-export-dynamic -lopenal -lruby1.8-static -lalut -lopenal -lpthread -ldl -lcrypt -lm -lc"
|
56
|
-
conftest.c: In function ‘t’:
|
57
|
-
conftest.c:3: warning: implicit declaration of function ‘alutGetErrorString’
|
58
|
-
checked program was:
|
59
|
-
/* begin */
|
60
|
-
1: /*top*/
|
61
|
-
2: int main() { return 0; }
|
62
|
-
3: int t() { alutGetErrorString(); return 0; }
|
63
|
-
/* end */
|
64
|
-
|
65
|
-
--------------------
|
66
|
-
|
1
|
+
have_library: checking for alGetError() in openal.lib... -------------------- no
|
2
|
+
|
3
|
+
"cl -nologo -Feconftest -I. -Ic:/ruby/lib/ruby/1.8/i386-mswin32 -IC:/w/ruby-openal/trunk/ext/openal -Ic:/ruby/lib/ruby/1.8/i386-mswin32 -MD -Zi -O2b2xg- -G6 conftest.c msvcrt-ruby18-static.lib openal.lib oldnames.lib user32.lib advapi32.lib ws2_32.lib -link -libpath:"c:/ruby/lib" -stack:0x2000000"
|
4
|
+
checked program was:
|
5
|
+
/* begin */
|
6
|
+
1: #define WIN32_LEAN_AND_MEAN
|
7
|
+
2: #include <winsock2.h>
|
8
|
+
3: #include <windows.h>
|
9
|
+
4:
|
10
|
+
5: /*top*/
|
11
|
+
6: int main() { return 0; }
|
12
|
+
7: int t() { void ((*volatile p)()); p = (void ((*)()))alGetError; return 0; }
|
13
|
+
/* end */
|
14
|
+
|
15
|
+
"cl -nologo -Feconftest -I. -Ic:/ruby/lib/ruby/1.8/i386-mswin32 -IC:/w/ruby-openal/trunk/ext/openal -Ic:/ruby/lib/ruby/1.8/i386-mswin32 -MD -Zi -O2b2xg- -G6 conftest.c msvcrt-ruby18-static.lib openal.lib oldnames.lib user32.lib advapi32.lib ws2_32.lib -link -libpath:"c:/ruby/lib" -stack:0x2000000"
|
16
|
+
checked program was:
|
17
|
+
/* begin */
|
18
|
+
1: /*top*/
|
19
|
+
2: int main() { return 0; }
|
20
|
+
3: int t() { alGetError(); return 0; }
|
21
|
+
/* end */
|
22
|
+
|
23
|
+
--------------------
|
24
|
+
|
data/ext/openal/openal_al.c
CHANGED
@@ -783,7 +783,7 @@ static VALUE AL_Source_attach(VALUE self, VALUE vBuf) {
|
|
783
783
|
Data_Get_Struct(self, ALuint, pSrc);
|
784
784
|
if ( CLASS_OF(vBuf) != vAL_Buffer )
|
785
785
|
return Qfalse;
|
786
|
-
Data_Get_Struct(
|
786
|
+
Data_Get_Struct(vBuf, ALuint, pBuf);
|
787
787
|
alSourcei(*pSrc, AL_BUFFER, *pBuf);
|
788
788
|
return Qtrue;
|
789
789
|
}
|
data/ruby-openal.gemspec
CHANGED
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
|
|
3
3
|
specification_version: 1
|
4
4
|
name: ruby-openal
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: "0.
|
7
|
-
date: 2007-
|
6
|
+
version: "0.2"
|
7
|
+
date: 2007-09-30 00:00:00 +09:00
|
8
8
|
summary: ruby-openal is a OpenAL Ruby binding. with ruby-openal, you can write sound effects in 3d space.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -29,33 +29,26 @@ post_install_message:
|
|
29
29
|
authors:
|
30
30
|
- Yun, Jonghyouk
|
31
31
|
files:
|
32
|
-
- ext
|
33
|
-
- lib
|
34
32
|
- test
|
35
|
-
-
|
36
|
-
-
|
37
|
-
- ruby-openal.gemspec
|
33
|
+
- test/test_al.rb
|
34
|
+
- ext
|
38
35
|
- ext/openal
|
39
|
-
- ext/openal/MANIFEST
|
40
|
-
- ext/openal/extconf.rb
|
41
|
-
- ext/openal/openal.h
|
42
36
|
- ext/openal/openal.c
|
43
37
|
- ext/openal/openal_al.h
|
44
38
|
- ext/openal/openal_alc.h
|
39
|
+
- ext/openal/openal.h
|
45
40
|
- ext/openal/openal_alut.c
|
46
|
-
- ext/openal/
|
41
|
+
- ext/openal/MANIFEST
|
42
|
+
- ext/openal/extconf.rb
|
47
43
|
- ext/openal/openal_alut.h
|
44
|
+
- ext/openal/openal_alc.c
|
48
45
|
- ext/openal/openal_al.c
|
49
46
|
- ext/openal/mkmf.log
|
50
|
-
-
|
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
|
47
|
+
- lib
|
56
48
|
- lib/openal
|
57
|
-
-
|
58
|
-
-
|
49
|
+
- setup.rb
|
50
|
+
- TODO
|
51
|
+
- ruby-openal.gemspec
|
59
52
|
test_files:
|
60
53
|
- test/test_al.rb
|
61
54
|
rdoc_options: []
|
data/ext/openal/Makefile
DELETED
@@ -1,149 +0,0 @@
|
|
1
|
-
|
2
|
-
SHELL = /bin/sh
|
3
|
-
|
4
|
-
#### Start of system configuration section. ####
|
5
|
-
|
6
|
-
srcdir = /home/ageldama/my/ruby-openal/trunk/ext/openal
|
7
|
-
topdir = /usr/lib/ruby/1.8/i486-linux
|
8
|
-
hdrdir = $(topdir)
|
9
|
-
VPATH = $(srcdir):$(topdir):$(hdrdir)
|
10
|
-
prefix = $(DESTDIR)/usr
|
11
|
-
exec_prefix = $(DESTDIR)/usr
|
12
|
-
sitedir = $(DESTDIR)/usr/local/lib/site_ruby
|
13
|
-
rubylibdir = $(libdir)/ruby/$(ruby_version)
|
14
|
-
docdir = $(datarootdir)/doc/$(PACKAGE)
|
15
|
-
dvidir = $(docdir)
|
16
|
-
datarootdir = $(prefix)/share
|
17
|
-
archdir = $(rubylibdir)/$(arch)
|
18
|
-
sbindir = $(exec_prefix)/sbin
|
19
|
-
psdir = $(docdir)
|
20
|
-
localedir = $(datarootdir)/locale
|
21
|
-
htmldir = $(docdir)
|
22
|
-
datadir = $(prefix)/share
|
23
|
-
includedir = $(prefix)/include
|
24
|
-
infodir = $(datarootdir)/info
|
25
|
-
sysconfdir = $(DESTDIR)/etc
|
26
|
-
mandir = $(datadir)/man
|
27
|
-
libdir = $(DESTDIR)/usr/lib
|
28
|
-
sharedstatedir = $(prefix)/com
|
29
|
-
oldincludedir = $(DESTDIR)/usr/include
|
30
|
-
pdfdir = $(docdir)
|
31
|
-
sitearchdir = $(sitelibdir)/$(sitearch)
|
32
|
-
bindir = $(exec_prefix)/bin
|
33
|
-
localstatedir = $(DESTDIR)/var
|
34
|
-
sitelibdir = $(sitedir)/$(ruby_version)
|
35
|
-
libexecdir = $(exec_prefix)/libexec
|
36
|
-
|
37
|
-
CC = gcc
|
38
|
-
LIBRUBY = $(LIBRUBY_SO)
|
39
|
-
LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
|
40
|
-
LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
|
41
|
-
LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
|
42
|
-
|
43
|
-
RUBY_EXTCONF_H =
|
44
|
-
CFLAGS = -fPIC -Wall -g -fno-strict-aliasing -O2 -fPIC
|
45
|
-
INCFLAGS = -I. -I. -I/usr/lib/ruby/1.8/i486-linux -I/home/ageldama/my/ruby-openal/trunk/ext/openal
|
46
|
-
CPPFLAGS = -DHAVE_SNPRINTF
|
47
|
-
CXXFLAGS = $(CFLAGS)
|
48
|
-
DLDFLAGS = -rdynamic -Wl,-export-dynamic
|
49
|
-
LDSHARED = $(CC) -shared
|
50
|
-
AR = ar
|
51
|
-
EXEEXT =
|
52
|
-
|
53
|
-
RUBY_INSTALL_NAME = ruby1.8
|
54
|
-
RUBY_SO_NAME = ruby1.8
|
55
|
-
arch = i486-linux
|
56
|
-
sitearch = i486-linux
|
57
|
-
ruby_version = 1.8
|
58
|
-
ruby = /usr/bin/ruby1.8
|
59
|
-
RUBY = $(ruby)
|
60
|
-
RM = rm -f
|
61
|
-
MAKEDIRS = mkdir -p
|
62
|
-
INSTALL = /usr/bin/install -c
|
63
|
-
INSTALL_PROG = $(INSTALL) -m 0755
|
64
|
-
INSTALL_DATA = $(INSTALL) -m 644
|
65
|
-
COPY = cp
|
66
|
-
|
67
|
-
#### End of system configuration section. ####
|
68
|
-
|
69
|
-
preload =
|
70
|
-
|
71
|
-
libpath = $(libdir)
|
72
|
-
LIBPATH = -L"$(libdir)"
|
73
|
-
DEFFILE =
|
74
|
-
|
75
|
-
CLEANFILES =
|
76
|
-
DISTCLEANFILES =
|
77
|
-
|
78
|
-
extout =
|
79
|
-
extout_prefix =
|
80
|
-
target_prefix =
|
81
|
-
LOCAL_LIBS =
|
82
|
-
LIBS = $(LIBRUBYARG_SHARED) -lalut -lopenal -lpthread -ldl -lcrypt -lm -lc
|
83
|
-
SRCS = openal.c openal_alut.c openal_alc.c openal_al.c
|
84
|
-
OBJS = openal.o openal_alut.o openal_alc.o openal_al.o
|
85
|
-
TARGET = openal
|
86
|
-
DLLIB = $(TARGET).so
|
87
|
-
EXTSTATIC =
|
88
|
-
STATIC_LIB =
|
89
|
-
|
90
|
-
RUBYCOMMONDIR = $(sitedir)$(target_prefix)
|
91
|
-
RUBYLIBDIR = $(sitelibdir)$(target_prefix)
|
92
|
-
RUBYARCHDIR = $(sitearchdir)$(target_prefix)
|
93
|
-
|
94
|
-
TARGET_SO = $(DLLIB)
|
95
|
-
CLEANLIBS = $(TARGET).so $(TARGET).il? $(TARGET).tds $(TARGET).map
|
96
|
-
CLEANOBJS = *.o *.a *.s[ol] *.pdb *.exp *.bak
|
97
|
-
|
98
|
-
all: $(DLLIB)
|
99
|
-
static: $(STATIC_LIB)
|
100
|
-
|
101
|
-
clean:
|
102
|
-
@-$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES)
|
103
|
-
|
104
|
-
distclean: clean
|
105
|
-
@-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
|
106
|
-
@-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
|
107
|
-
|
108
|
-
realclean: distclean
|
109
|
-
install: install-so install-rb
|
110
|
-
|
111
|
-
install-so: $(RUBYARCHDIR)
|
112
|
-
install-so: $(RUBYARCHDIR)/$(DLLIB)
|
113
|
-
$(RUBYARCHDIR)/$(DLLIB): $(DLLIB)
|
114
|
-
$(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
|
115
|
-
install-rb: pre-install-rb install-rb-default
|
116
|
-
install-rb-default: pre-install-rb-default
|
117
|
-
pre-install-rb: Makefile
|
118
|
-
pre-install-rb-default: Makefile
|
119
|
-
$(RUBYARCHDIR):
|
120
|
-
$(MAKEDIRS) $@
|
121
|
-
|
122
|
-
site-install: site-install-so site-install-rb
|
123
|
-
site-install-so: install-so
|
124
|
-
site-install-rb: install-rb
|
125
|
-
|
126
|
-
.SUFFIXES: .c .m .cc .cxx .cpp .C .o
|
127
|
-
|
128
|
-
.cc.o:
|
129
|
-
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
|
130
|
-
|
131
|
-
.cxx.o:
|
132
|
-
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
|
133
|
-
|
134
|
-
.cpp.o:
|
135
|
-
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
|
136
|
-
|
137
|
-
.C.o:
|
138
|
-
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
|
139
|
-
|
140
|
-
.c.o:
|
141
|
-
$(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) -c $<
|
142
|
-
|
143
|
-
$(DLLIB): $(OBJS)
|
144
|
-
@-$(RM) $@
|
145
|
-
$(LDSHARED) $(DLDFLAGS) $(LIBPATH) -o $@ $(OBJS) $(LOCAL_LIBS) $(LIBS)
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
$(OBJS): ruby.h defines.h
|
data/ext/openal/openal.o
DELETED
Binary file
|
data/ext/openal/openal.so
DELETED
Binary file
|
data/ext/openal/openal_al.o
DELETED
Binary file
|
data/ext/openal/openal_alc.o
DELETED
Binary file
|
data/ext/openal/openal_alut.o
DELETED
Binary file
|
data/test/test_al.rb~
DELETED
@@ -1,67 +0,0 @@
|
|
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
|