Skip to content

undefined local variable or method `raw_audio' for main:Object (NameError) #3

@tablecell

Description

@tablecell

test.rb

require 'opus-ruby'

# 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

ruby test.rb
in <main>': undefined local variable or methodraw_audio' for main:Object (NameError)

I want record audio from system audio device

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions