-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
78 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
LDFLAGS=`libmikmod-config --libs` | ||
|
||
PHP_ARG_WITH(mod_player, for module audio files support, | ||
[ --with-mod-player[=DIR] include cli audio support]) | ||
PHP_ARG_WITH(modplayer, for module audio files support, | ||
[ --with-modplayer[=DIR] include module player support]) | ||
|
||
if test "$PHP_MOD_PLAYER" != "no"; then | ||
for i in $PHP_MOD_PLAYER /usr/local /usr; do | ||
if test "$PHP_MODPLAYER" != "no"; then | ||
for i in $PHP_MODPLAYER /usr/local /usr; do | ||
test -f $i/include/mikmod.h && MIKMOD_DIR=$i && break | ||
done | ||
|
||
if test -z "$PHP_MOD_PLAYER"; then | ||
if test -z "$PHP_MODPLAYER"; then | ||
AC_MSG_ERROR(mikmod.h not found. Please reinstall libmikmod.) | ||
fi | ||
|
||
PHP_ADD_LIBRARY_WITH_PATH(mod_player, $MIKMOD_DIR/$PHP_LIBDIR) | ||
PHP_ADD_LIBRARY_WITH_PATH(modplayer, $MIKMOD_DIR/$PHP_LIBDIR) | ||
PHP_ADD_INCLUDE($MIKMOD_DIR/include) | ||
|
||
PHP_NEW_EXTENSION(mod_player, mod_player.c, $ext_shared,,) | ||
PHP_NEW_EXTENSION(modplayer, modplayer.c, $ext_shared, cli,) | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/** | ||
* PHP CLI AUDIO STREAMMER | ||
* | ||
* This is a extension to provide a stream of module audio files under | ||
* the CLI SAPI. This library is licensed under the MIT license. | ||
* | ||
* Developed by: devSDMF <devsdmf@gmail.com> | ||
* | ||
*/ | ||
#ifndef PHP_MODPLAYER_H | ||
#define PHP_MODPLAYER_H 1 | ||
|
||
#ifdef ZTS | ||
#include "TSRM.h" | ||
#endif | ||
|
||
ZEND_BEGIN_MODULE_GLOBALS(modplayer) | ||
long pid; | ||
ZEND_END_MODULE_GLOBALS(modplayer) | ||
|
||
#ifdef ZTS | ||
#define MODPLAYER_G(v) TSRM(modplayer_globals_id, zend_modplayer_globals *, v) | ||
#else | ||
#define MODPLAYER_G(v) (modplayer_globals.v) | ||
#endif | ||
|
||
#define PHP_MODPLAYER_EXTNAME "modplayer" | ||
#define PHP_MODPLAYER_VERSION "1.1.0" | ||
|
||
PHP_MINIT_FUNCTION(modplayer); | ||
PHP_MSHUTDOWN_FUNCTION(modplayer); | ||
|
||
PHP_FUNCTION(play_module_file); | ||
PHP_FUNCTION(mod_player_getpid); | ||
PHP_FUNCTION(stop_module_file); | ||
|
||
int stream_audio(FILE *fptr, int maxchan, int curious); | ||
|
||
extern zend_module_entry modplayer_module_entry; | ||
#define phpext_mod_player_ptr &modplayer_module_entry; | ||
|
||
#endif |