Skip to content

spessasus/stbvorbis_sync.js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

stbvorbis_sync.js

An ES6, synchronous port of stbvorbis.js. Suitable for use in the AudioWorkletGlobalScope.

Originally ported for use with SpessaSynth.

Usage

Download stbvorbis_sync.js. Copy stbvorbis_sync.js to your desired destination.

To use, import it like this:

import { stbvorbis } from "./stbvorbis_sync.js"

API

decode

stbvorbis.decode(buf: ArrayBuffer|Uint8Array)

decode decodes the given Ogg/Vorbis data.

The return value is an object, formatted like this

name description
data An array of Float32Array that represents decoded stream for each channel.
sampleRate The sample rate like 44100.
eof True if the stream ends, otherwise false. If this is true, data is null.
error An error string if exists, otherwise null.

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%