@ekx/auph
v0.1.5
Published
[](https://github.com/eliasku/auph/actions/workflows/build.yml) [](https://www.npmjs.com/package/auph) [, full left channel is-1, full Right channel is1. - Rate: control playback rate of Voice, by default is
1(100% speed of playback)- alt: Pitch, Speed
Voice Flags
- Loop Mode: voice could be in the loop mode or not.
- Running Flag: played voice is active until it's stopped, either we are able to pause or resume playback by setting Running flag on and off.
Voice lifecycle
- Play: open voice object, associate it with Audio Data and start playback. If Paused flag is set on Play, voice is alive, but will being on pause.
- Stop: stop and close voice object.
Notes
Decoding MP3 audio files
It's recommended to re-encode all foreign MP3 audio files to fix Safari issues. For example, you could use ffmpeg tooling:
ffmpeg -i broken.mp3 -c:a copy -c:v copy fixed.mp3Building
Install build requirements first
Install and Build
# install dependencies
yarn
# build js libraries for browser, nodejs and emscripten
yarn buildDemo projects
Browser demo
yarn build-demo
yarn start-demoNodeJS demo
cd demo
node node.jsC++ console demo with cmake
cd demo/cpp
# configure and build cmake project
cmake -B build .
cmake --build build
# run: current working directory is important to load shared assets correctly
cd build
./auph-console-test
iOS Xcode / Android projects
# install dependencies is required
yarn
# open Xcode project
open demo/xcode/auph-ios.xcodeproj
# open Android Studio project ("studio" is command-line shell for Android Studio)
studio demo/androidSearch path to dependencies is hardcoded in project settings, so you need
node_modulesfolder in the repository root, if you working in monorepo workspaces you need tono-hoistthem
