• This repository has been archived on 15/Jun/2024
  • Stars
    star
    27
  • Rank 905,827 (Top 18 %)
  • Language
    C
  • License
    Apache License 2.0
  • Created over 6 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A JavaScript port of stb_vorbis.c

stbvorbis.js

A JavaScript port of stb_vorbis.c.

Usage

Download files from Releases. Copy stbvorbis.js and stbvorbis_asm.js to your file server and load stbvorbis.js via a script tag.

This library basically uses WebAssembly. stbvorbis.js also has asm.js implementation for environments where WebAssembly is not available. On iOS, stbvorbis.js always uses asm.js instead due to instability of iOS WebAssembly implementation. If stbvorbis_asm.js is in the same directory as stbvorbis.js, asm.js version works as fallback.

API

decode

stbvorbis.decode(buf: ArrayBuffer|Uint8Array, callback: function(event: Object))

decode decodes the given Ogg/Vorbis data.

The given callback is called when decoding proceeded or error happens. The argument is an object that has these keys:

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.

decodeStream

stbvorbis.decodeStream(callback: function(event: Object)): function(event: Object)

decodeStream decodes the given Ogg/Vorbis stream.

The given callback is called when decoding proceeded or error happens. The argument is an object that has these keys:

name description
data An array of Float32Array that represents decoded stream for each channel. The length can be more than or equal to 0.
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.

The returned function is used to push input strem. The argument is an object that has these keys:

name description
data ArrayBuffer or Uint8Array that represents encoded stream.
eof True if the stream ends, otherwise false. If this is true, data is ignored.

Compile

Install Docker and run build.sh on Posix or build.ps1 on Windows.

More Repositories

1

ebiten

Ebitengine - A dead simple 2D game engine for Go
Go
10,614
star
2

go-mp3

An MP3 decoder in pure Go
Go
745
star
3

go2cpp

A converter from Go to C++
Go
254
star
4

wasmserve

An HTTP server for testing Wasm
Go
243
star
5

hitsumabushi

Run Go programs (almost) everywhere
C
175
star
6

goc

A C interpreter in Go
Go
119
star
7

file2byteslice

A dead simple tool to embed a file to Go
Go
92
star
8

go-steamworks

A Steamworks SDK binding for Go
Go
89
star
9

asobiba

A Go Playground in WebAssembly
JavaScript
67
star
10

go2dotnet

A converter from Go to .NET (C#)
Go
45
star
11

bitmapfont

Package bitmapfont offers a font.Face value of some bitmap fonts
Go
45
star
12

starruby

A 2D Game Library in Ruby
C
29
star
13

gopherwasm

MOVED TO https://github.com/gopherjs/gopherwasm : A wrapper for GopherJS (`gopherjs/js`) and Wasm (`syscall/js`)
Go
18
star
14

cocoa_in_go

Cocoa application written in Go
Go
17
star
15

wasm-bench

Wasm Benchmark Experiment
JavaScript
16
star
16

chinesegamefonts

Chinese fonts for games: Compressed TTF binaries based on Source Han Sans (Noto Sans CJK).
Go
16
star
17

star-chat

StarChat
JavaScript
15
star
18

otto-gopherjs

Run JavaScript on browsers via Otto converted by GopherJS
Go
13
star
19

rpgmmv

Plugins for RPG Maker MV
JavaScript
11
star
20

ebitenguidemo

[WIP] A GUI demonstration in Ebiten
Go
10
star
21

ebitenginegamejam2022

Ebitengine Game Jam 2022
Go
10
star
22

hitozuma

Super IRC Bot Hitozuma (人妻)
Ruby
9
star
23

notarize

Package notarize provides APIs for Apple application notarization
Go
9
star
24

go-jisx0208

Converts a JIS X 0208 code to a rune
Go
9
star
25

ugoki

An animation editor?
Go
8
star
26

ebitenui

[WIP] A UI library based on Ebiten
Go
8
star
27

go-eossdk

An Epic Online Services SDK binding for Go
Go
8
star
28

oklab

Package oklab provides color.Color implementations for Oklab and Oklch.
Go
8
star
29

embeddll

An experiment to embed C DLL into Go program
Go
8
star
30

starruby-samplerpg

Sample RPG of Star Ruby
7
star
31

go-memorymodule

Go port of MemoryModule
C
7
star
32

macapp

A software to create a minimal *.app directory
Go
7
star
33

hajimehoshi

6
star
34

meiro

Software to generate mazes
Go
6
star
35

ebiten-suspended

Ebiten - A Simple 2D Game Library -
C++
5
star
36

starruby-launcher

Star Ruby Launcher for Windows
Ruby
5
star
37

unagi

An RPG Editor on a modern browser
TypeScript
5
star
38

ruby-php

Let's use PHP's == operator in Ruby!
Ruby
5
star
39

go-mplus-bitmap

DEPRECATED: Use https://github.com/hajimehoshi/go-mplusbitmap
Go
5
star
40

overlay-exp

Experiment with -overlay
Go
4
star
41

gopherwalk

[WIP] A game with Gophers
Go
4
star
42

go-libtess2

WIP: Go port of Mikko's libtess2
Go
4
star
43

hajimehoshi.com

hajimehoshi.com
Go
4
star
44

sugoimaze

Ebitengine Game Jam 2024
Go
4
star
45

ebiten-book-code

Code snippets in the Ebiten book
Go
4
star
46

ebitenginegamejam2023

Ebitengine Game Jam 2023
JavaScript
4
star
47

go-mplusbitmap

NO LONGER MAINTAINED: See https://github.com/hajimehoshi/bitmapfont
Go
4
star
48

ncs

Package ncs provides color in Natural Color System
Go
4
star
49

gophermv

An RPG Maker MV client written in Go
Go
3
star
50

go2carchive

[WIP] Go to C archive
Dockerfile
3
star
51

switches

Maze Game
Go
3
star
52

starrpg

An Web Site to Create RPGs
Go
3
star
53

directx-test

DirectX Test
C++
3
star
54

boxes

A Sokoban game for Ebiten tutorials
Go
3
star
55

niwatori

Dungeon Generator
Ruby
3
star
56

exp

Experimental things
JavaScript
3
star
57

fileserver

A dead simple HTTP server to serve files
Go
3
star
58

mplus-bitmap-images

Images generated from M+ fonts (bitmap)
Go
3
star
59

kakeibo

Household accounts application working on Google App Engine
Go
3
star
60

png2compressedrgba

A converter to convert a PNG file to a compressed RGBA binary
Go
3
star
61

shrimp-old

RPG Editor
C++
2
star
62

testhtml

test
HTML
2
star
63

kaiko-old

Something great
C++
2
star
64

shrimp

A Map Editor written in C#
C#
2
star
65

vivliostyle-test

Vivliostyle test
CSS
2
star
66

star-chat-irc-bridge

StarChat IRC Bridge
Ruby
2
star
67

ikiw

Something like Wiki
Ruby
2
star
68

ncspalette

WIP
Go
2
star
69

kaiko

A 2D game library written in D?
D
2
star
70

sandbox

A sandbox for me
HTML
2
star
71

egltest

EGL test
C++
2
star
72

anki_obsolete

Helper to memorize things for me
Python
2
star
73

dojin-style

同人θͺŒη”¨ TeX スタむル
TeX
2
star
74

oggloop

An Ogg/Vorbis meta data parser for LOOPSTART and LOOPLENGTH as RPG Maker does
Go
2
star
75

snippets

A simple storage on Google App Engine with hash keys for small and immutable data
Go
2
star
76

kagi

A simple password generator
Go
2
star
77

baseline-test

HTML
1
star
78

canvas_test

TypeScript
1
star
79

shirokuro

Go
1
star
80

project-euler

Project Euler (http://projecteuler.net/)
Haskell
1
star
81

ebiten.pagestorage

JavaScript files generated by GopherJS for http://hajimehoshi.github.io/ebiten/
1
star
82

hajimehoshi.github.com

hajimehoshi.github.com
1
star
83

serializer-bench

Go
1
star
84

ogvjs

Released files from https://github.com/brion/ogv.js/
JavaScript
1
star
85

playgroundtest

Go
1
star
86

darwin-wx-test

Experimental: Go + wxWidgets in OSX
C++
1
star
87

go-vorbis

WIP - Go port of stb_vorbis (http://nothings.org/stb_vorbis/)
Go
1
star
88

binpng

Converter to an two-valued PNG image
Go
1
star