Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/discordjs/opus
Native opus bindings for node
https://github.com/discordjs/opus
discord-bot discordjs hacktoberfest native-bindings node nodejs opus
Last synced: about 1 month ago
JSON representation
Native opus bindings for node
- Host: GitHub
- URL: https://github.com/discordjs/opus
- Owner: discordjs
- License: mit
- Created: 2020-01-15T09:06:51.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-03-09T09:36:03.000Z (8 months ago)
- Last Synced: 2024-04-14T02:28:56.286Z (7 months ago)
- Topics: discord-bot, discordjs, hacktoberfest, native-bindings, node, nodejs, opus
- Language: C++
- Homepage:
- Size: 1.54 MB
- Stars: 183
- Watchers: 8
- Forks: 52
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# @discordjs/opus [![Build](https://github.com/discordjs/opus/workflows/Build/badge.svg)](https://github.com/discordjs/opus/actions?query=workflow%3ABuild) [![Prebuild](https://github.com/discordjs/opus/workflows/Prebuild/badge.svg)](https://github.com/discordjs/opus/actions?query=workflow%3APrebuild)
> Native bindings to libopus v1.3
## Usage
```js
const { OpusEncoder } = require('@discordjs/opus');// Create the encoder.
// Specify 48kHz sampling rate and 2 channel size.
const encoder = new OpusEncoder(48000, 2);// Encode and decode.
const encoded = encoder.encode(buffer);
const decoded = encoder.decode(encoded);
```## Platform support
⚠ Node.js 12.0.0 or newer is required.
- Linux x64 & ia32
- Linux arm (RPi 1 & 2)
- Linux arm64 (RPi 3)
- macOS x64
- macOS arm64
- Windows x64