Skip to content

C program to decode Opus (specifically Ogg pages of Opus audio)

License

Notifications You must be signed in to change notification settings

aliabbas299792/wasmOpusDecoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Run:

./setupEmsdkOpus.sh

To download and configure emsdk and opus correctly, and then run:

./compile.sh

To compile main.c to produce main.wasm and main.js, in the static folder.

The file static/assets/index.js has code to play interleaved PCM using the WebAudio API.

The requirements for this to work are that you provide some method to get Ogg pages of Opus audio (see RFC 3533, RFC 6716 and RFC 7845).

If you provide 2 Ogg pages as input to the program (say the Nth and N-1th pages of some file), then they will be decoded such that if they are played sequentially there will be no glitching/clicking sound between them.

Then to actually server the files, just do yarn or whatever to get the stuff installed, and then do node server.js, and then navigate to localhost:3000 to see it working, and just press Play Music to start it.

About

C program to decode Opus (specifically Ogg pages of Opus audio)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published