Name Modified Size InfoDownloads / Week
Parent folder
main.c 2014-09-07 973 Bytes
Totals: 1 Item   973 Bytes 0
/*
* WebXmp
* ======
*
* 	Copyright (C) 2014 Juergen Wothke
*
* Original C code of xmp (see http://xmp.sourceforge.net/).
*
* LICENSE
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or (at
* your option) any later version. This library is distributed in the hope
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
*/


This "project" is based on libxmp (4.2.8): Almost all the changes but the additional makeEmscripten.bat (which can be found in the parent folder) are contained in this subfolder.

The main addition is the new interface.c file: It encapsulates all those APIs that interface with the 
JavaScript/Web world. 

In this "old" version of libxmp two fixes in some original files are needed to resolve complier
problems (these no longer are needed in more recent versions).


Howto build:

You'll need Emscripten (I used the win installer on WinXP: emsdk-1.13.0-full-32bit.exe which could be found here: http://kripken.github.io/emscripten-site/docs/getting_started/downloads.html) I did not need to perform 
ANY additions or manual changes on the installation. The below instructions assume that the libxmp-4.2.8 project 
folder has been moved into the main emscripten folder (maybe not necessary) and that a command prompt has been 
opened within that project folder, and that the Emscripten environment vars have been set (run emsdk_env.bat).

Running the makeEmscripten.bat in the libxmp-4.2.8 project folder will generate a JavaScript 'xmp' library (webXmp.js) including the above mentioned interface APIs. This generated lib is then used from some manually written JavaScript/WebAudio code (see htdocs_xmp/sample_player.js). The two files can easily be pasted into one and minified if desired.

An example how the player can then be used from HTML can be found in htdocs/index.html

Source: readme.txt, updated 2014-09-07