New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

oggmented

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oggmented

Drop-in replacement for AudioContext. Overrides decodeAudioData and provides Ogg Vorbis decoding, calling super.decodeAudioData for non-vorbis.

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

oggmented

oggmented extends AudioContext and overrides decodeAudioData to use an Emscripten transpiling of libogg-1.3.4 and libvorbis-1.3.6 when it encounters ogg vorbis data.

This allows you to decodeAudioData ogg vorbis buffers correctly in any browser. This is especially useful in Safari and iOS browsers, which don't decodeAudioData(oggVorbisBuffer) at all.

In addition, Blink (Brave, Opera, Chrome) uses ffmpeg, which has a bug that slightly bloats the end of decoded vorbis audio, resulting in clicks when audioContext.createBufferSource().loop === true. Using this package fixes that (assuming of course that the waveform begins and ends at the same place etc).

Installation

npm install oggmented

Usage

Use it like you would regular AudioContext:

import oggmentedAudioContext from 'oggmented'

const audioCtx = new oggmentedAudioContext()
// instead of 
// const audioCtx = new (window.AudioContext || window.webkitAudioContext)()

Keywords

ogg

FAQs

Package last updated on 17 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts