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

[expo-av] Streaming Audio Buffers in realtime (JSI Audio) #13516

Closed
wants to merge 188 commits into from

Conversation

mrousavy
Copy link
Contributor

@mrousavy mrousavy commented Jul 7, 2021

Why

see discussion: #13404

Goal: Be able to run any processing on individual audio samples, either in realtime ("streaming") or on a whole audio file. This is useful for example to show waveforms or any other kind of audio visualization, such as in the Telegram app:


I got a basic prototype working with JSI where I calculate the average "loudness" of a 44,1 kHz stereo track from XXXTentacion using a RMV algorithm fully in JavaScript and it runs really fast and smooth:

Screen.Recording.2021-07-06.at.13.03.17.mov
This part will be implemented in a separate PR.

also you can use this for non-realtime cases where you want to calculate a waveform for whole audio files:


How

jsi magic

Test Plan

Checklist

  • Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md).
  • This diff will work correctly for expo build (eg: updated @expo/xdl).
  • This diff will work correctly for expo prebuild & EAS Build (eg: updated a module plugin).

@mrousavy mrousavy added Android iOS Audio AV java Pull requests that update Java code javascript Pull requests that update Javascript code labels Jul 7, 2021
Copy link
Collaborator

@expo-bot expo-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review previously left here is no longer valid, jump to the latest one 👉 #13516 (review)

@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Jul 7, 2021
Copy link
Collaborator

@expo-bot expo-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review previously left here is no longer valid, jump to the latest one 👉 #13516 (review)

Copy link
Collaborator

@expo-bot expo-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review previously left here is no longer valid, jump to the latest one 👉 #13516 (review)

@expo-bot expo-bot removed the bot: suggestions ExpoBot has some suggestions label Jul 7, 2021
Copy link
Collaborator

@expo-bot expo-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review previously left here is no longer valid, jump to the latest one 👉 #13516 (review)

@expo-bot expo-bot added the bot: passed checks ExpoBot has nothing to complain about label Jul 7, 2021
@mrousavy
Copy link
Contributor Author

mrousavy commented Jul 7, 2021

thanks @expo-ci you're the man

@tsapeta tsapeta removed AV Android Audio iOS java Pull requests that update Java code javascript Pull requests that update Javascript code labels Jul 7, 2021
@tsapeta
Copy link
Member

tsapeta commented Jul 7, 2021

👆 We use those labels only for issues, there is no need to clutter PRs with them 😉

@mrousavy
Copy link
Contributor Author

mrousavy commented Jul 7, 2021

Oh I see, my bad! Thanks for removing

Copy link
Collaborator

@expo-bot expo-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review previously left here is no longer valid, jump to the latest one 👉 #13516 (review)

Copy link
Collaborator

@expo-bot expo-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review previously left here is no longer valid, jump to the latest one 👉 #13516 (review)

Copy link
Collaborator

@expo-bot expo-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review previously left here is no longer valid, jump to the latest one 👉 #13516 (review)

Copy link
Collaborator

@expo-bot expo-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review previously left here is no longer valid, jump to the latest one 👉 #13516 (review)

Copy link
Collaborator

@expo-bot expo-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review previously left here is no longer valid, jump to the latest one 👉 #13516 (review)

Copy link
Collaborator

@expo-bot expo-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review previously left here is no longer valid, jump to the latest one 👉 #13516 (review)

@expo-bot expo-bot removed the bot: passed checks ExpoBot has nothing to complain about label Jul 8, 2021
@tsapeta
Copy link
Member

tsapeta commented Dec 5, 2021

Because this PR was in unreviewable state, it's been superseded by #14904.

@tsapeta tsapeta closed this Dec 5, 2021
@tsapeta tsapeta deleted the @mrousavy/jsi-audio branch September 27, 2022 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: passed checks ExpoBot has nothing to complain about
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants