Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

12 Commits

Repository files navigation

celt-ruby

http://www.github.com/perrym5/celt-ruby

CELT-Ruby is a Ruby Gem for working with the CELT Audio Codec. CELT-Ruby uses the Ruby-FFI extension to wrap the native CELT library code. This means that you must have CELT installed in order for this gem to work.

This gem was designed to fill a specific role in another one of my projects. As a result, the feature set is relatively small compared to the native libraries. However, I will accept any pull requests with additional functionality should someone need it.

What this library can do:

  • Encode raw audio to CELT

  • Ruby >= 1.9.2

  • CELT 0.7 Library

[sudo] gem install celt-ruby
# Create new encoder with a sample rate of 48 kHz, a frame size of 480 bytes and 1 channelencoder = Celt::Encoder.new48000, 480, 1# Set the prediction request to 0encoder.prediction_request = 0# Set the VBR rate to 60,000encoder.vbr_rate = 60000# Return the bitstream version for this version of CELTencoder.bitstream_version# Encode some raw audiocompressed_size = [@encoder.vbr_rate/800, 127].minencoded = encoder.encode(raw_audio, compressed_size)
# Safely destroy encoderencoder.destroy

About

Ruby FFI module for the CELT Audio Codec

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages