Skip to content

Proof-of-concept. Get audio levels data from StreamPack in a better way#272

Open
dimadesu wants to merge 2 commits intomainfrom
feature/custom_audio_effects
Open

Proof-of-concept. Get audio levels data from StreamPack in a better way#272
dimadesu wants to merge 2 commits intomainfrom
feature/custom_audio_effects

Conversation

@dimadesu
Copy link
Owner

@dimadesu dimadesu commented Feb 1, 2026

There is a Git issue in StreamPack repo ThibaultBee/StreamPack#39 about adding VU meters aka audio levels support to StreamPack.

This PR is to see if idea from ThibaultBee/StreamPack#278 is feasible.

I put changes from the branch feature/custom_audio_effects from that PR on top of my StreamPack fork update-to-3.1.0, resolved merge conflicts and put it on a branch update-to-3.1.0+feature/custom_audio_effects.

I only had to make a small adjustment on top of StreamPack in commit dimadesu/StreamPack@9671a9d to get it to work.

I can build project fine.
I can see audio levels working in the app as expected.

… before launching the coroutine

The problem was that ByteBuffer.duplicate() only creates a new view over the same native memory - it doesn't actually copy the bytes.
When the original DirectByteBuffer was returned to the pool and freed, both the original and the "duplicate" became invalid.
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.

1 participant