LINUX.ORG.RU

Ответ на: комментарий от linuhs_user

SDL2_Mixer поддерживает 3D звук

This effect emulates a simple 3D audio effect. It's not all that realistic, but it can help improve some level of realism. By giving it the angle and distance from the camera's point of view, the effect pans and attenuates volumes. If you are looking for better positional audio, using OpenAL is suggested.(c) https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_82.html

monk ★★★★★ ()
Ответ на: комментарий от linuhs_user

Ну так а чего не хватает?

Например, звука от движущегося источника. Типа:

(defun lesson2 ()
  (let ((sourcepos #(0.0 0.0 0.0))
        (sourcevel #(0.0 0.0 0.1)))
    (alut:with-init
	  (multiple-value-bind (buffer source data)
	      ;; m-v-b? I'm worried SBCL will forget about
	      ;; BUFFER and DATA. They're in C space.
	      (init-source-data sourcepos sourcevel)
        (declare (ignore buffer data))
	    (init-listener)
	    (al:source-play source)
	    (dotimes (i 250)
	      (sleep 0.1)
	      (setf sourcepos (map 'vector #'+ sourcepos sourcevel))
	      (al:source source :position sourcepos))))))

из https://github.com/zkat/cl-openal/blob/master/examples/lesson2.lisp

monk ★★★★★ ()