npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ekx/auph

v0.1.5

Published

[![Build](https://github.com/eliasku/auph/actions/workflows/build.yml/badge.svg)](https://github.com/eliasku/auph/actions/workflows/build.yml) [![Version](https://img.shields.io/npm/v/auph)](https://www.npmjs.com/package/auph) [![Downloads](https://img.sh

Downloads

6

Readme

🔊 auph 🎧

Build Version Downloads

Trivial audio mixer API for native and web targets. Online Demo

⚠️ Work in progress! API is constantly changing. The native playback at the moment sounds bad, has not been tested, and has not been fully tested on mobile projects.

Core Concepts

Objects

  • Mixer: global mixer, could be initialized and terminated, paused and resumed.
  • Buffer: data buffers that can be loaded and unloaded. We are playing audio from Buffer objects.
  • Voice: instance of Audio Player used to control sound playback.
  • Bus: simple hierarchy object for mixing, Master Bus is connected to Mixer's output. All another bus objects are connected to the Master Bus. Bus splits game track audio voices by groups Music, Sound, Speech. Enable controlling of Gain and Muting for each audio group.

Parameters

  • Gain: volume of Bus or Voice.
  • Pan: control stereo-panning of Voice, by default is 0 (center balance), full left channel is -1, full Right channel is 1.
  • 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.mp3

Building

Install build requirements first

Install and Build

# install dependencies
yarn

# build js libraries for browser, nodejs and emscripten
yarn build

Demo projects

Browser demo

yarn build-demo
yarn start-demo

NodeJS demo

cd demo
node node.js

C++ 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/android

Search path to dependencies is hardcoded in project settings, so you need node_modules folder in the repository root, if you working in monorepo workspaces you need to no-hoist them