Skip to content

v2.3.0 Audio Support!

Latest

Choose a tag to compare

@mario-deluna mario-deluna released this 29 Sep 11:45
· 17 commits to master since this release
ee758ef

What's Changed

  • We now officially support PHP 8.4.
  • We now support Audio!
  • We now support glDrawElements for element based rendering.
  • You can now upload buffers of all types to the GPU.
  • We have added an experimental .vox (MagicaVoxel) file parser.

Audio Support

You can now manage and play audio / sounds inside your php-glfw context.

s

  • Master and per sound volume control
  • Pitch control
  • Panning support
  • Raw data extraction
  • Seeking support
  • 3D Audio support, sounds can have a position and velocity in 3D space
  • Volume fade support

Example Code

Basic usage of the sound engine is incredibly simple.

// start an audio engine
$audioEngine = new \GL\Audio\Engine();

// load piece of sound from disk
$music = $audioEngine->soundFromDisk(__DIR__ . '/my_music.mp3');

// play the music
$music->play();

Quick Demo Video:

audio-support-glfw.mp4

Voxel file support (Experimental)

We now support reading MagicaVoxel .vox files, to easily import and render voxel models.

This is very experimental and still subject to change.

s2

PR's

Full Changelog: v2.2.1...v2.3.0