GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Ponup/php-openal: OpenAL audio library bindings for PHP

BranchesTags
Open more actions menu

Latest commit

 

History

38 Commits
38 Commits

Folders and files

NameName
Last commit message
Last commit date
examples
examples
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
Dockerfile
Dockerfile
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
config.m4
config.m4
 
 
docker-entrypoint.sh
docker-entrypoint.sh
 
 
package.xml
package.xml
 
 
php_openal.c
php_openal.c
 
 
php_openal.h
php_openal.h
 
 

Repository files navigation

Build Status

PHP-OpenAL

OpenAL bindings for PHP.

$device = openal_device_open(null);
$context = openal_context_create($device);
openal_context_current($context);

$source = openal_source_create();
$buffer = openal_buffer_create();
openal_buffer_data($buffer, AL_FORMAT_STEREO16, $wavData, $wavSampleRate);

openal_source_set($source, AL_BUFFER, $buffer);
openal_source_set($source, AL_LOOPING, true);

openal_source_play($source);
sleep($wavLength);
openal_source_stop($source);

openal_context_destroy($context);
openal_device_close($device);

Requirements

  • PHP8.1
  • OpenAL library and headers

Documentation

https://www.php.net/manual/en/book.openal.php

Docker

docker build -t php-openal .
docker run -it --device /dev/snd -e PULSE_SERVER=/tmp/pulse-native -e PULSE_COOKIE=/tmp/pulse-cookie -v $XDG_RUNTIME_DIR/pulse/native:/tmp/pulse-native -v ~/.config/pulse/cookie:/tmp/pulse-cookie --group-add audio --entrypoint php php-openal examples/example.php

Building

phpize
./configure --with-openal=/usr/local/Cellar/openal-soft/1.19.1 # Adjust path accordingly
make
sudo make install

Packaging

pear package # This will generate an openal-X.X.X.tgz to push to pecl.php.net

About

OpenAL audio library bindings for PHP

pecl.php.net/package/openal

Topics

audioextensionopenalphp

Resources

Readme
MIT license
Activity
Custom properties

Stars

7 stars

Watchers

0 watching

Forks

3 forks
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.