Sha256: ec4c83fc436930f7dddf7d92186adff4d238508393d11f0972f6b5691f4edff3
Contents?: true
Size: 1.01 KB
Versions: 3
Compression:
Stored size: 1.01 KB
Contents
# opus-ruby OPUS-Ruby is a Ruby Gem for working with the OPUS Audio Codec. OPUS-Ruby uses the Ruby-FFI extension to wrap the native OPUS library code. This means that you must have OPUS installed in order for this gem to work. ## Installation Add this line to your application's Gemfile: gem 'opus-ruby' And then execute: $ bundle Or install it yourself as: $ gem install opus-ruby ## Usage # Create new encoder with a sample rate of 48 kHz, a frame size of 480 bytes and 1 channel encoder = Opus::Encoder.new 48000, 480, 1 # Set the bitrate to 32 kbit/s encoder.bitrate = 32000 # Set the VBR rate to 0 (CBR) encoder.vbr_rate = 0 # Encode some raw audio encoded = encoder.encode(raw_audio, 960) # Safely destroy encoder encoder.destroy ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
opus-ruby-1.0.1 | README.md |
opus-ruby-1.0.0 | README.md |
opus-ruby-0.0.1 | README.md |