diff --git a/.github/workflows/calm.yml b/.github/workflows/calm.yml index d00dbfeb..a9214a28 100644 --- a/.github/workflows/calm.yml +++ b/.github/workflows/calm.yml @@ -8,7 +8,7 @@ on: jobs: - Linux: + Linux-and-Web: runs-on: ubuntu-22.04 steps: @@ -33,7 +33,7 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *.tar *.tgz @@ -48,6 +48,8 @@ jobs: env: CI_MATRIX_OS: ${{ matrix.os }} + HOMEBREW_NO_AUTO_UPDATE: 1 + HOMEBREW_NO_INSTALL_CLEANUP: 1 steps: - uses: actions/checkout@v3 @@ -59,7 +61,7 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *.tgz *.dmg @@ -80,7 +82,7 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *.tgz *.zip diff --git a/.github/workflows/example-circles.yml b/.github/workflows/example-circles.yml index 18c988cd..cb2b08ac 100644 --- a/.github/workflows/example-circles.yml +++ b/.github/workflows/example-circles.yml @@ -19,7 +19,7 @@ jobs: - name: Build run: | set -x - curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.2/calm.tgz + curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.3/calm.tgz mkdir calm tar xvf calm.tgz --directory=calm ls -lah calm @@ -34,7 +34,7 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *-web.zip Linux: @@ -46,7 +46,7 @@ jobs: - name: Build run: | set -x - curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.2/calm.tgz + curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.3/calm.tgz mkdir calm tar xvf calm.tgz --directory=calm ls -lah calm @@ -60,7 +60,7 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *.AppImage macOS: @@ -72,7 +72,9 @@ jobs: env: CI_MATRIX_OS: ${{ matrix.os }} - + HOMEBREW_NO_AUTO_UPDATE: 1 + HOMEBREW_NO_INSTALL_CLEANUP: 1 + steps: - uses: actions/checkout@v3 @@ -80,7 +82,7 @@ jobs: run: | set -x export OS_SUBFIX=".${CI_MATRIX_OS}" - curl -L -o calm.dmg https://github.com/VitoVan/calm/releases/download/0.1.2/calm${OS_SUBFIX}.dmg + curl -L -o calm.dmg https://github.com/VitoVan/calm/releases/download/0.1.3/calm${OS_SUBFIX}.dmg hdiutil attach calm.dmg cp -R "/Volumes/Calm - CALM/Calm.app/Contents/MacOS/" calm ls -lah calm @@ -98,7 +100,7 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *.dmg Windows: @@ -114,7 +116,7 @@ jobs: run: | set -x pacman -S --noconfirm --needed unzip - curl -L -o calm.zip https://github.com/VitoVan/calm/releases/download/0.1.2/calm.zip + curl -L -o calm.zip https://github.com/VitoVan/calm/releases/download/0.1.3/calm.zip unzip calm.zip -d calm ls -lah calm export PATH=$PATH:$(pwd)/calm/ @@ -128,6 +130,6 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *.exe diff --git a/.github/workflows/example-fan.yml b/.github/workflows/example-fan.yml index 6b7b867d..fb0e777b 100644 --- a/.github/workflows/example-fan.yml +++ b/.github/workflows/example-fan.yml @@ -19,7 +19,7 @@ jobs: - name: Build run: | set -x - curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.2/calm.tgz + curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.3/calm.tgz mkdir calm tar xvf calm.tgz --directory=calm ls -lah calm @@ -34,7 +34,7 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *-web.zip Linux: @@ -46,7 +46,7 @@ jobs: - name: Build run: | set -x - curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.2/calm.tgz + curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.3/calm.tgz mkdir calm tar xvf calm.tgz --directory=calm ls -lah calm @@ -60,7 +60,7 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *.AppImage macOS: @@ -72,6 +72,8 @@ jobs: env: CI_MATRIX_OS: ${{ matrix.os }} + HOMEBREW_NO_AUTO_UPDATE: 1 + HOMEBREW_NO_INSTALL_CLEANUP: 1 steps: - uses: actions/checkout@v3 @@ -80,7 +82,7 @@ jobs: run: | set -x export OS_SUBFIX=".${CI_MATRIX_OS}" - curl -L -o calm.dmg https://github.com/VitoVan/calm/releases/download/0.1.2/calm${OS_SUBFIX}.dmg + curl -L -o calm.dmg https://github.com/VitoVan/calm/releases/download/0.1.3/calm${OS_SUBFIX}.dmg hdiutil attach calm.dmg cp -R "/Volumes/Calm - CALM/Calm.app/Contents/MacOS/" calm ls -lah calm @@ -98,7 +100,7 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *.dmg Windows: @@ -114,7 +116,7 @@ jobs: run: | set -x pacman -S --noconfirm --needed unzip - curl -L -o calm.zip https://github.com/VitoVan/calm/releases/download/0.1.2/calm.zip + curl -L -o calm.zip https://github.com/VitoVan/calm/releases/download/0.1.3/calm.zip unzip calm.zip -d calm ls -lah calm export PATH=$PATH:$(pwd)/calm/ @@ -128,6 +130,6 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *.exe diff --git a/.github/workflows/example-meditator.yml b/.github/workflows/example-meditator.yml index e059f577..4466978e 100644 --- a/.github/workflows/example-meditator.yml +++ b/.github/workflows/example-meditator.yml @@ -20,7 +20,7 @@ jobs: - name: Build run: | set -x - curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.2/calm.tgz + curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.3/calm.tgz mkdir calm tar xvf calm.tgz --directory=calm ls -lah calm @@ -37,7 +37,7 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *-web.zip Linux: @@ -49,7 +49,7 @@ jobs: - name: Build run: | set -x - curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.2/calm.tgz + curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.3/calm.tgz mkdir calm tar xvf calm.tgz --directory=calm ls -lah calm @@ -63,7 +63,7 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *.AppImage macOS: @@ -75,6 +75,8 @@ jobs: env: CI_MATRIX_OS: ${{ matrix.os }} + HOMEBREW_NO_AUTO_UPDATE: 1 + HOMEBREW_NO_INSTALL_CLEANUP: 1 steps: - uses: actions/checkout@v3 @@ -83,7 +85,7 @@ jobs: run: | set -x export OS_SUBFIX=".${CI_MATRIX_OS}" - curl -L -o calm.dmg https://github.com/VitoVan/calm/releases/download/0.1.2/calm${OS_SUBFIX}.dmg + curl -L -o calm.dmg https://github.com/VitoVan/calm/releases/download/0.1.3/calm${OS_SUBFIX}.dmg hdiutil attach calm.dmg cp -R "/Volumes/Calm - CALM/Calm.app/Contents/MacOS/" calm ls -lah calm @@ -101,7 +103,7 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *.dmg Windows: @@ -117,7 +119,7 @@ jobs: run: | set -x pacman -S --noconfirm --needed unzip - curl -L -o calm.zip https://github.com/VitoVan/calm/releases/download/0.1.2/calm.zip + curl -L -o calm.zip https://github.com/VitoVan/calm/releases/download/0.1.3/calm.zip unzip calm.zip -d calm ls -lah calm export PATH=$PATH:$(pwd)/calm/ @@ -131,6 +133,6 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *.exe diff --git a/.github/workflows/example-mondrian.yml b/.github/workflows/example-mondrian.yml index c4c8579d..a235c0cf 100644 --- a/.github/workflows/example-mondrian.yml +++ b/.github/workflows/example-mondrian.yml @@ -19,7 +19,7 @@ jobs: - name: Build run: | set -x - curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.2/calm.tgz + curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.3/calm.tgz mkdir calm tar xvf calm.tgz --directory=calm ls -lah calm @@ -34,7 +34,7 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *-web.zip Linux: @@ -46,7 +46,7 @@ jobs: - name: Build run: | set -x - curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.2/calm.tgz + curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.3/calm.tgz mkdir calm tar xvf calm.tgz --directory=calm ls -lah calm @@ -60,7 +60,7 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *.AppImage macOS: @@ -72,6 +72,8 @@ jobs: env: CI_MATRIX_OS: ${{ matrix.os }} + HOMEBREW_NO_AUTO_UPDATE: 1 + HOMEBREW_NO_INSTALL_CLEANUP: 1 steps: - uses: actions/checkout@v3 @@ -80,7 +82,7 @@ jobs: run: | set -x export OS_SUBFIX=".${CI_MATRIX_OS}" - curl -L -o calm.dmg https://github.com/VitoVan/calm/releases/download/0.1.2/calm${OS_SUBFIX}.dmg + curl -L -o calm.dmg https://github.com/VitoVan/calm/releases/download/0.1.3/calm${OS_SUBFIX}.dmg hdiutil attach calm.dmg cp -R "/Volumes/Calm - CALM/Calm.app/Contents/MacOS/" calm ls -lah calm @@ -98,7 +100,7 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *.dmg Windows: @@ -114,7 +116,7 @@ jobs: run: | set -x pacman -S --noconfirm --needed unzip - curl -L -o calm.zip https://github.com/VitoVan/calm/releases/download/0.1.2/calm.zip + curl -L -o calm.zip https://github.com/VitoVan/calm/releases/download/0.1.3/calm.zip unzip calm.zip -d calm ls -lah calm export PATH=$PATH:$(pwd)/calm/ @@ -128,6 +130,6 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *.exe diff --git a/.github/workflows/sbcl.yml b/.github/workflows/sbcl.yml index b1567b45..a8f42293 100644 --- a/.github/workflows/sbcl.yml +++ b/.github/workflows/sbcl.yml @@ -47,7 +47,7 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *.zip @@ -92,7 +92,7 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *.zip @@ -146,6 +146,6 @@ jobs: - name: GH Release uses: softprops/action-gh-release@v0.1.14 with: - prerelease: true + draft: true files: | *.zip diff --git a/build/build.sh b/build/build.sh index 9f922157..4b03e441 100644 --- a/build/build.sh +++ b/build/build.sh @@ -32,7 +32,9 @@ build_fedora () { } build_darwin () { - brew update + # don't do this, some stupid CI would take forever and then fail + # brew update + echo "build launcher ..." brew install gcc gcc src/calm.c -o calm diff --git a/calm.asd b/calm.asd index 02112770..fa84acd2 100644 --- a/calm.asd +++ b/calm.asd @@ -1,6 +1,6 @@ (asdf:defsystem #:calm :description "CALM - Canvas Aided Lisp Magic" - :version "0.1.2" + :version "0.1.3" :author "Vito Van" :license "GNU General Public License, version 2" :depends-on ( diff --git a/docs/changelog.org b/docs/changelog.org index f2571416..57df91bf 100644 --- a/docs/changelog.org +++ b/docs/changelog.org @@ -1,4 +1,14 @@ * CALM +** 0.1.3 +- fix version check in command `calm hello` +- add `c:halt-wav` + i.e. SDL2_mixer/Mix_HaltChannel +- add `fc-init-reinitialize` + to load fonts while developing with `calm` command +- add volume controle `c:volume` and `c:volume-music` + i.e. SDL2_mixer/Mix_Volume, SDL2_mixer/Mix_VolumeMusic +- add `c:play-audio` and `c:halt-audio` on web + i.e. HTMLAudioElement: new Audio(url) ** 0.1.2 - add touch event support, mainly for mobile + web should also work on all platforms diff --git a/s/usr/all/panic.lisp b/s/usr/all/panic.lisp index 497e481f..f2a78828 100644 --- a/s/usr/all/panic.lisp +++ b/s/usr/all/panic.lisp @@ -5,12 +5,13 @@ ;; version check won't work on JSCL, since the lack of ASDF ;; #-jscl -(let ((required-version "0.1.2") +(let ((required-version "0.1.3") (calm-version (slot-value (asdf:find-system 'calm) 'asdf:version))) (when (uiop:version< calm-version required-version) (format t "Sorry, this is built on CALM ~A, older version (current: ~A) of CALM won't work.~%" - required-version calm-versio))) + required-version calm-version) + (uiop:quit))) ;; diff --git a/s/usr/macos/dmg.lisp b/s/usr/macos/dmg.lisp index 1eaf18a5..7b5e9201 100644 --- a/s/usr/macos/dmg.lisp +++ b/s/usr/macos/dmg.lisp @@ -16,7 +16,11 @@ (u:exec (str:concat - "create-dmg --skip-jenkins --hdiutil-verbose --volname \"" app-name " - CALM\"" + "create-dmg " + (if (string= (uiop:getenv "CI_MATRIX_OS") "macos-13") + " --skip-jenkins" ;; macos-13 not working yet + " ") + " --hdiutil-verbose --volname \"" app-name " - CALM\"" " --volicon \"" dmg-icon "\"" " --window-pos 200 120" " --window-size 800 280" diff --git a/s/usr/web/wasm.lisp b/s/usr/web/wasm.lisp index 862fb8cc..55e8190f 100644 --- a/s/usr/web/wasm.lisp +++ b/s/usr/web/wasm.lisp @@ -262,6 +262,9 @@ "_SDL_RWFromFile," "_Mix_PlayMusic," "_Mix_HaltMusic," + "_Mix_HaltChannel," + "_Mix_Volume," + "_Mix_VolumeMusic," "_Mix_PlayChannelTimed," "_Mix_Playing," "_Mix_AllocateChannels," diff --git a/src/c.lisp b/src/c.lisp index a1980b0b..3af109c8 100644 --- a/src/c.lisp +++ b/src/c.lisp @@ -127,6 +127,7 @@ (show-layout layout :cr cr))) (defun open-audio-if-not-yet () + ;; (format t "open-audio-if-not-yet, already opened?: ~A~%" calm::*calm-state-audio-open*) (unless calm::*calm-state-audio-open* ;; ;; if we put the following code outside of this function, @@ -138,23 +139,25 @@ ;; (sdl2-mixer:init) #+jscl (#j:_Mix_OpenAudio - calm::*calm-music-frequency* - calm::*calm-music-format* - calm::*calm-music-channels* - calm::*calm-music-chunksize*) + calm::*calm-audio-frequency* + calm::*calm-audio-format* + calm::*calm-audio-channels* + calm::*calm-audio-chunksize*) #-jscl (sdl2-mixer:open-audio - calm::*calm-music-frequency* - calm::*calm-music-format* + calm::*calm-audio-frequency* + calm::*calm-audio-format* ;; channels: number of channels (1 is mono, 2 is stereo, etc). - calm::*calm-music-channels* - calm::*calm-music-chunksize*) + calm::*calm-audio-channels* + calm::*calm-audio-chunksize*) #+jscl - (#j:_Mix_AllocateChannels 8) + (#j:_Mix_AllocateChannels calm::*calm-audio-numchans*) #-jscl - (sdl2-mixer:allocate-channels 8))) + (sdl2-mixer:allocate-channels calm::*calm-audio-numchans*) + (setf calm::*calm-state-audio-open* t))) -(defun play-music (pathname &optional (loops 0)) +(defun play-music (pathname &key (loops 0)) + ;; (format t "playing music: ~A~%" pathname) (open-audio-if-not-yet) (let* ((music-pathname #+jscl @@ -179,17 +182,18 @@ #-jscl (sdl2-mixer:play-music music-object loops))) -(defun play-wav (pathname &optional (loops 0)) +(defun play-wav (pathname &key (loops 0) (channel -1)) + ;; (format t "playing wav: ~A~%" pathname) (open-audio-if-not-yet) (let* ((wav-pathname - #+jscl + #+jscl (concatenate 'string "/usr/share/" pathname) ;; /usr/share/assets/ will be embedded #-jscl (or (uiop:absolute-pathname-p pathname) (uiop:merge-pathnames* pathname (uiop:getenv "CALM_APP_DIR")))) (wav-object-cache - (cdr (assoc wav-pathname calm::*calm-state-loaded-audio* - #+jscl :test #+jscl #'string=))) + (cdr (assoc wav-pathname calm::*calm-state-loaded-audio* + #+jscl :test #+jscl #'string=))) (wav-object (or wav-object-cache #+jscl (let* ((wav-pathname-allocated-ptr (#j:allocateUTF8 wav-pathname)) @@ -203,10 +207,30 @@ (sdl2-mixer:load-wav wav-pathname)))) (unless wav-object-cache (push (cons wav-pathname wav-object) calm::*calm-state-loaded-audio*)) - #+jscl - (#j:_Mix_PlayChannelTimed -1 wav-object loops -1) - #-jscl - (sdl2-mixer:play-channel -1 wav-object loops))) + + ;; only play when there is/are available channel(s) + (when (< (playing) calm::*calm-audio-numchans*) + #+jscl + (#j:_Mix_PlayChannelTimed channel wav-object loops -1) + #-jscl + (sdl2-mixer:play-channel channel wav-object loops)))) + +#+jscl +(defun play-audio (audio-url &key (loop-audio-p nil) (volume 1)) + (format t "playing audio: ~A~%" audio-url) + (let* ((audio-object-cache + (cdr (assoc audio-url calm::*calm-state-loaded-audio* :test #'string=))) + (audio-object + (or audio-object-cache + ;; https://github.com/jscl-project/jscl/wiki/JSCL-and-manipulations-with-JS-objects + (#j:window:eval (concatenate 'string "new Audio('" audio-url "')")) + ))) + (unless audio-object-cache + (push (cons audio-url audio-object) calm::*calm-state-loaded-audio*)) + (when loop-audio-p + (setf (jscl::oget audio-object "loop") t)) + (setf (jscl::oget audio-object "volume") volume) + ((jscl::oget audio-object "play")))) (defun playing () #+jscl @@ -214,12 +238,39 @@ #-jscl (sdl2-mixer:playing -1)) +(defun volume-music (music-volume) + #+jscl + (#j:_Mix_VolumeMusic music-volume) + #-jscl + (sdl2-mixer:volume-music music-volume)) + +(defun volume (channel volume) + #+jscl + (#j:_Mix_Volume channel volume) + #-jscl + (sdl2-mixer:volume channel volume)) + (defun halt-music () #+jscl (#j:_Mix_HaltMusic) #-jscl (sdl2-mixer:halt-music)) +(defun halt-wav (&optional (channel -1)) + #+jscl + (#j:_Mix_HaltChannel channel) + #-jscl + (sdl2-mixer:halt-channel channel)) + +#+jscl +(defun halt-audio (&optional (url nil)) + (loop + for object in calm::*calm-state-loaded-audio* + when (or (null url) (string= (car object) url)) + do + (format t "halting: ~A~%" object) + ((jscl::oget (cdr object) "pause")))) + (defun get-ticks () #+jscl (#j:_SDL_GetTicks) diff --git a/src/config.lisp b/src/config.lisp index f8bf36ec..c8cb33c0 100644 --- a/src/config.lisp +++ b/src/config.lisp @@ -43,26 +43,28 @@ setting it back to `t' will paint the canvas again and again by calling the `draw' function, again. ") #-jscl -(defparameter *calm-music-format* sdl2-ffi:+audio-s32sys+) +(defparameter *calm-audio-format* sdl2-ffi:+audio-s32sys+) #+jscl -(defparameter *calm-music-format* 32800) +(defparameter *calm-audio-format* 32800) -(defparameter *calm-music-frequency* 44100) -(defparameter *calm-music-channels* 2) +(defparameter *calm-audio-frequency* 44100) +(defparameter *calm-audio-channels* 2) ;; ;; chunksize: audio buffer size in sample FRAMES (total samples divided by channel count). -;; I thought it should be: (* calm::*calm-music-channels* calm::*calm-music-frequency*) +;; I thought it should be: (* calm::*calm-audio-channels* calm::*calm-audio-frequency*) ;; but, it was delayed, I have to set it to `1024' according to this: ;; https://stackoverflow.com/questions/983997/i-have-an-unintended-delay-in-playing-a-mix-chunk #-jscl -(defparameter *calm-music-chunksize* 1024) +(defparameter *calm-audio-chunksize* 1024) ;; but, when it is on the browser, ;; I have to set it to a very large value to make things a little more smooth, ;; it still suffers some wierd noises sometimes. ;; I don't know why, please enlight me if you know something about this #+jscl -(defparameter *calm-music-chunksize* (* 4 1024)) +(defparameter *calm-audio-chunksize* (* 4 1024)) +;; the number of channels +(defparameter *calm-audio-numchans* 8) ;; runtime variables @@ -174,10 +176,11 @@ (format t "fontpath: ~A~%" (uiop:native-namestring (merge-pathnames "fonts/" *calm-env-app-dir*))) (format t "fontfile: ~A~%" (uiop:native-namestring (merge-pathnames "fonts/fonts.conf" *calm-env-app-dir*))) + ;; https://www.freedesktop.org/software/fontconfig/fontconfig-user.html#DEBUG ;; (setf (uiop:getenv "FC_DEBUG") "1024") ;; init fc - (fontconfig:fc-init) + (fontconfig:fc-init-reinitialize) ) #+jscl diff --git a/src/fontconfig.lisp b/src/fontconfig.lisp index 0dd53fe6..50255e5b 100644 --- a/src/fontconfig.lisp +++ b/src/fontconfig.lisp @@ -40,6 +40,8 @@ (cffi:defcfun (fc-init "FcInit") :pointer) +(cffi:defcfun (fc-init-reinitialize "FcInitReinitialize") :pointer) + (cffi:defcfun (fc-create-pattern "FcPatternCreate") :pointer) (cffi:defcfun (fc-pattern-add-string "FcPatternAddString") :bool diff --git a/src/package.lisp b/src/package.lisp index d839ea22..2c9f989a 100644 --- a/src/package.lisp +++ b/src/package.lisp @@ -8,6 +8,9 @@ :play-wav :playing :halt-music + :halt-wav + :volume + :volume-music :get-ticks :keq :show-png @@ -50,6 +53,7 @@ :weight :slant :fc-init + :fc-init-reinitialize :fc-create-pattern :fc-pattern-add-string :fc-pattern-add-integer diff --git a/src/web/package.lisp b/src/web/package.lisp index 1e55382b..23339ed3 100644 --- a/src/web/package.lisp +++ b/src/web/package.lisp @@ -148,7 +148,12 @@ :playing :play-music :play-wav + :play-audio :halt-music + :halt-wav + :halt-audio + :volume + :volume-music :get-ticks :keq :show-png