Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for unencapsulated opus and exposing max_data_bytes #229

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tj10200
Copy link

@tj10200 tj10200 commented Jan 20, 2021

Reopening this PR against a stable dev branch.

3 main changes are present here that I'd like to get merged in.

A change to autogen.sh that disables neon support in speexdsp. This was required to compile the fork currently available on master via clang/Osx.
The optimized neon library includes inline asm. From this thread it appears that emscripten doesn't support inline asm instructions.
The next two are functional changes. I work on a streaming service with some hardware support that doesn't utilize a container based approach to streaming the audio. The changes are:

A new parameter rawOpus
This prevents encapsulation of the opus frames into an ogg container. Each encoded opus frame is ejected as soon as it's
available. The frames are not segmented, nor are they placed into Ogg pages.

A new parameter encoderOutputMaxLength.
This exposes the parameter to the main recorder API that maps onto max_data_bytes as part of the libOpus opus_encode_float function. The hardware devices we stream data into has some limitations around frame sizes that need to be controlled. This step saves me from having to re-encode the frame after it's ejected from this recorder.

I added a couple unit tests, but not super complete. I'd need to get an encodable frame plugged into the unit tests to validate at a lower level.

…ive asm commands. Emscripten doesn't support

adding rawOpus option to encoderWorker

don't publish raw opus packets when encoding fails

adding encoder config to main recorder API

UT to verify rawOpus settign doesn't publish encode failures

Adding new config items to README

Updating tracked dist files

updating tracked package-lock.json

working rawOpus and encoderOutputMaxLength options
@WindowsNT
Copy link

Very good, I use rawOpus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants