Git Product home page Git Product logo

nsfplayer-wasm's Introduction

Notice

This program has been superseded by Web-GME-Player.

nsfplayer-wasm

Play a single NSF/NSFe file track in the browser and loop infinitely. (Currently, the app relies on NSFe's length property to work)

Please look at the webpage in the docs folder to learn how to use nsfplayer-wasm.

The audio worklet functionality is non-functional. It is part of this repository in case anyone wants to make a pull request.

How to build

Download the source of game-music-emu from its bitbucket repository. Follow the wiki steps to compile, but use emscripten tools. Use this command for cmake: emcmake cmake ../ -DUSE_GME_AY=0 -DUSE_GME_GBS=0 -DUSE_GME_GYM=0 -DUSE_GME_HES=0 -DUSE_GME_KSS=0 -DUSE_GME_SAP=0 -DUSE_GME_SPC=0 -DUSE_GME_VGM=0 -DENABLE_UBSAN=OFF -DBUILD_SHARED_LIBS=OFF

If you get errors like "gme_ay_type undefined, gme_gbs_type undefined...", you have to either edit blargg_config.h or the type_list function in gme.cpp.

Then, build the wasm and js with emcc -O0 -I./game-music-emu/gme ./game-music-emu/build/gme/libgme.a main.c -o nsfplayer-mono-stereo.js -sEXPORTED_RUNTIME_METHODS=ccall,cwrap,getValue

Audio Worklet

Build the audio worklet module with emcc -O3 -I./game-music-emu/gme ./game-music-emu/build/gme/libgme.a main.c -o nsfplayer-audio-worklet-mono.js -sEXPORTED_RUNTIME_METHODS=ccall,cwrap,getValue -s WASM_ASYNC_COMPILATION=0 -s SINGLE_FILE --post-js nsfplayer-audio-worklet-main.js

nsfplayer-wasm's People

Contributors

thysbelon avatar

Stargazers

 avatar

Watchers

 avatar

nsfplayer-wasm's Issues

Audio Worklet Doesn't Work

This is already mentioned in the README, but I am making it an issue as well to keep things organized.

Compile wasm with Optimization Greater than 0

The last time I worked on this program, I was unable to compile the c code with optimization greater than 0 without it breaking. The error seemed to be with a piece of code generated by Emscripten, not anything I wrote. Still, I am making this an issue on my repository so I remember to try to fix this if I ever come back to this program.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.