Update of /project/cello/cvsroot/cl-openal
In directory common-lisp.net:/tmp/cvs-serv25298
Modified Files:
altypes.lisp cl-openal-config.lisp cl-openal-demo.lisp
cl-openal-init.lisp cl-openal.lpr cl-opengl-config.lisp
wav-handling.lisp
Log Message:
OSX merge
Date: Wed Jun 15 23:08:42 2005
Author: ktilton
Index: cl-openal/altypes.lisp
diff -u cl-openal/altypes.lisp:1.1 cl-openal/altypes.lisp:1.2
--- cl-openal/altypes.lisp:1.1 Fri May 27 21:10:29 2005
+++ cl-openal/altypes.lisp Wed Jun 15 23:08:42 2005
@@ -24,6 +24,7 @@
(dft al-bitfield #-allegro-v5.0.1 :unsigned-int #+allegro-v5.0.1 :int integer)
(dft al-int :int integer)
+(dft al-sizei :int integer)
(dft al-uint #-allegro-v5.0.1 :unsigned-int #+allegro-v5.0.1 :int integer)
(dft al-ushort #-allegro-v5.0.1 :unsigned-int #+allegro-v5.0.1 :int integer)
Index: cl-openal/cl-openal-config.lisp
diff -u cl-openal/cl-openal-config.lisp:1.1 cl-openal/cl-openal-config.lisp:1.2
--- cl-openal/cl-openal-config.lisp:1.1 Fri May 27 21:10:29 2005
+++ cl-openal/cl-openal-config.lisp Wed Jun 15 23:08:42 2005
@@ -23,17 +23,19 @@
(in-package :cl-openal)
(defparameter *al-dynamic-lib*
- (make-pathname #+lispworks :host #-lispworks :device "c"
- :directory '(:absolute "windows" "system32")
- :name "openal32"
- :type "dll"))
+ #+darwin
+ (make-pathname :directory '(:absolute "Library" "Frameworks" "OpenAL.framework")
+ :name "OpenAL")
+ #-darwin
+ (make-pathname :directory '(:absolute "windows" "system32")
+ :name "openal32"
+ :type "dll"))
(defparameter *alut-dynamic-lib*
- (make-pathname :directory '(:absolute "cell-cultures" "cell-cultures-user" "dynlib")
+ (make-pathname :directory '(:absolute "0dev" "user" "dynlib")
:name "alut" :type "dll"))
(defparameter *audio-files*
(make-pathname
- :directory '(:absolute "cell-cultures" "cell-cultures-user"
- "sounds")
+ :directory '(:absolute "cell-cultures" "user" "sounds")
:type "wav"))
Index: cl-openal/cl-openal-demo.lisp
diff -u cl-openal/cl-openal-demo.lisp:1.1 cl-openal/cl-openal-demo.lisp:1.2
--- cl-openal/cl-openal-demo.lisp:1.1 Fri May 27 21:10:29 2005
+++ cl-openal/cl-openal-demo.lisp Wed Jun 15 23:08:42 2005
@@ -4,7 +4,8 @@
(defparameter g-buffers (fgn-alloc 'al-uint num_buffers))
(defun cl-openal-test ()
- (let ((w$ (list "/cell-cultures/cell-cultures-user/sounds/click2.wav" )))
+ (let ((w$ (list "/0dev/user/sounds/jshootme.wav" )))
+ (cl-openal-init)
(apply 'wav-play-till-end
(lambda (dur sources)
(loop for source in sources
Index: cl-openal/cl-openal-init.lisp
diff -u cl-openal/cl-openal-init.lisp:1.1 cl-openal/cl-openal-init.lisp:1.2
--- cl-openal/cl-openal-init.lisp:1.1 Fri May 27 21:10:29 2005
+++ cl-openal/cl-openal-init.lisp Wed Jun 15 23:08:42 2005
@@ -43,7 +43,7 @@
:module "openal")
() "Failed to load OpenAL dynamic lib ~a" *al-dynamic-lib*)
-
+ #-darwin
(assert (uffi:load-foreign-library *alut-dynamic-lib*
:force-load #+lispworks nil #-lispworks t
:module "alut")
Index: cl-openal/cl-openal.lpr
diff -u cl-openal/cl-openal.lpr:1.1 cl-openal/cl-openal.lpr:1.2
--- cl-openal/cl-openal.lpr:1.1 Fri May 27 21:10:29 2005
+++ cl-openal/cl-openal.lpr Wed Jun 15 23:08:42 2005
@@ -1,4 +1,4 @@
-;; -*- lisp-version: "7.0 [Windows] (May 6, 2005 8:25)"; cg: "1.54.2.17"; -*-
+;; -*- lisp-version: "7.0 [Windows] (Jun 10, 2005 13:34)"; cg: "1.54.2.17"; -*-
(in-package :cg-user)
@@ -16,8 +16,7 @@
(make-instance 'module :name "cl-openal-init.lisp")
(make-instance 'module :name "wav-handling.lisp")
(make-instance 'module :name "cl-openal-demo.lisp"))
- :projects (list (make-instance 'project-module :name
- "\\0dev\\hello-c\\hello-c"))
+ :projects nil
:libraries nil
:distributed-files nil
:internally-loaded-files nil
Index: cl-openal/cl-opengl-config.lisp
diff -u cl-openal/cl-opengl-config.lisp:1.1 cl-openal/cl-opengl-config.lisp:1.2
--- cl-openal/cl-opengl-config.lisp:1.1 Fri May 27 21:10:29 2005
+++ cl-openal/cl-opengl-config.lisp Wed Jun 15 23:08:42 2005
@@ -39,5 +39,5 @@
(setq *glut-dynamic-lib*
(merge-pathnames
(make-pathname :name "freeglut" :type "dll")
- cl-user::*cell-cultures-dynlib-directory*))
+ cl-user::*user-dynlib-directory*))
Index: cl-openal/wav-handling.lisp
diff -u cl-openal/wav-handling.lisp:1.1 cl-openal/wav-handling.lisp:1.2
--- cl-openal/wav-handling.lisp:1.1 Fri May 27 21:10:29 2005
+++ cl-openal/wav-handling.lisp Wed Jun 15 23:08:42 2005
@@ -31,19 +31,19 @@
(al-chk "al-Gen-Sources")
(prog1
(loop for n below count
- collecting (progn (assert (plusp (fgn-pa sources n)))
- (fgn-pa sources n)))
+ collecting (progn (assert (plusp (elti sources n)))
+ (elti sources n)))
(fgn-free sources)))))
(defun al-source-free (sources)
(let* ((sct (if (listp sources)
(length sources) 1))
(sv (fgn-alloc 'al-uint sct)))
- (if (> sct 1)
+ (if (listp sources)
(loop for s in sources
- and n below sct
- do (setf (fgn-pa sv n) s))
- (setf (fgn-pa sv 0) sources))
+ and n below sct
+ do (setf (elti sv n) s))
+ (setf (elti sv 0) sources))
(al-delete-sources sct sv)
(fgn-free sv)))
@@ -91,7 +91,8 @@
(al-chk "wav-to-buffer al-gen-buffer")
(unwind-protect
- (with-cstring (f$ (namestring wav-path))
+ (#-openmcl with-cstrings #+openmcl ccl::with-cstrs ;; hunh?
+ ((f$ (namestring wav-path)))
(alut-load-wav-file f$ format datahandle size freq loop)
(al-chk " wav-to-buffer alut-load-wav-File")
@@ -102,18 +103,21 @@
:freq (fgn-pa freq 0)
:loop (fgn-pa loop 0)))
- (when (null-pointer-p (elti datahandle 0))
+ (when (null-pointer-p (fgn-pa datahandle 0)) ;; 04-11-14 was elti, bad for OpenMCL
+ (break "null-pointer-p datahandle ~a" datahandle)
(return-from wav-to-buffer nil))
- (al-buffer-data (fgn-pa buffer 0) (elti format 0) (fgn-pa datahandle 0)
- (elti size 0)(elti freq 0))
+ (print (list :buffering-data (elti buffer 0) (elti format 0) (fgn-pa datahandle 0)
+ (elti size 0)(elti freq 0)))
+ (al-buffer-data (elti buffer 0) (elti format 0) (fgn-pa datahandle 0)
+ (elti size 0)(elti freq 0))
(al-chk "al-buffer-data")
(alut-unload-wav (elti format 0)(fgn-pa datahandle 0)
(elti size 0)(elti freq 0))
(al-chk "alut-unload-wav")
-
- (fgn-pa buffer 0))
+ (format t "~&buffer is ~a" (elti buffer 0))
+ (elti buffer 0))
(fgn-free buffer)
(fgn-free format)
(fgn-free datahandle)
@@ -122,8 +126,8 @@
(fgn-free loop)))))
(defun source-buffer-load (source buffer)
- (assert (plusp source))
- (assert (plusp buffer))
+ ; (assert (plusp source))
+ ; (assert (plusp buffer))
(al-source-stop source)
(al-chk "al-Source-Stop")
@@ -131,4 +135,4 @@
(al-sourcei source al_buffer buffer)
(al-chk "al-Sourcei AL_BUFFER")
- source)
\ No newline at end of file
+ source)