2008/7/25 Luke Crook <[EMAIL PROTECTED]>:
> On Wed, 23 Jul 2008 04:11:28 -0700, css <[EMAIL PROTECTED]> wrote:
>
>> Maybe something similar can be added to sdl-mixer, too. For example,
>> for me, the following functions seem to work (they are working fine
>> unter clisp and sbcl for me):
>
> Added:
>
> - (LOAD-MUSIC filename)
> - (LOAD-MUSIC rwops)
> - (LOAD-MUSIC vector)
>
> - (LOAD-SAMPLE filename)
> - (LOAD-SAMPLE rwops)
> - (LOAD-SAMPLE vector)
>
> Please let me know if (LOAD-MUSIC rwops) works. I am calling the function
> Mix_LoadMUS_RW and I'm not sure if this is correct.
>
> - Luke
Hello. (load-sample vector) doesnt work on both clisp and sbcl.
Error under CLISP:
*** - FFI::FOREIGN-CALL-OUT: #<LISPBUILDER-SDL:RWOPS #x21E36066>
cannot be converted to the foreign type FFI:C-POINTER
Error under SBCL:
The value #<LISPBUILDER-SDL:RWOPS {AE39579}>
is not of type
SYSTEM-AREA-POINTER.
[Condition of type TYPE-ERROR]
However. My code works (the code i sended to the mailinglist). When changing
(defun Load-WAV (array)
(cffi:with-foreign-object (mem-array :unsigned-char (length array))
(loop for i from 0 below (length array) do
(setf (cffi:mem-aref mem-array :unsigned-char i) (aref array i)))
(sdl-mixer-cffi::Load-WAV-RW (sdl-cffi::sdl-rw-from-mem mem-array
(length array)) 1)))
into
(defun Load-WAV (array)
(sdl-mixer-cffi::Load-WAV-RW (sdl::create-rwops-from-byte-array array) 1))
I get the same errors. It seems like sdl::create-rwops-from-byte-array
does something wrong. I see that it should do the same, but it doesnt
work, neither on clisp nore on sbcl.
- Christoph
_______________________________________________
application-builder mailing list
[email protected]
http://www.lispniks.com/mailman/listinfo/application-builder