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

Improve buffering #39

Merged
merged 8 commits into from
Dec 6, 2024
Merged

Improve buffering #39

merged 8 commits into from
Dec 6, 2024

Conversation

teamclouday
Copy link
Owner

@teamclouday teamclouday commented Dec 5, 2024

Some work in progress and plans to improve the app:

  • Remove oboe and unnecessary audio buffers
  • Use kotlin flow for pub/sub pattern on Android side
  • Use protobuf for serialization
  • RustApp wave widget render
  • Impl protobuf on tcp
  • Impl protobuf on udp (no sure if it's possible yet)
  • Impl protobuf on adb
  • Impl protobuf on bluetooth
  • RustApp bluetooth server
  • Automatically start recording, tap notification to stop and close service
  • Restart audio manager when config has changed
  • Better test connection with password (server generate random passcode, client uses passcode to connect)
  • RustApp resample input audio stream

Continuing from #38

@teamclouday
Copy link
Owner Author

teamclouday commented Dec 6, 2024

Some note of remaining work for future:

  • Auto start audio on Android side
    This will make it much easier to use the app
  • Improve TestConnection code to use Protobuf
    Clean up old code
  • TestConnection with random passcode
    Not very necessary because it's running in local network
  • bluetooth and udp on RustApp
    Not necessary but good to have, can be added some day
  • DSP methods like noise suppression/voice activity/echo cancellation
    Good to have, can be added some day
  • Resample audio on RustApp
    This is needed when there's a mismatch between Android sample rate and RustApp sample rate. However existing library requires casting samples to f32 first before resampling. It also depends on the supported audio format of the cpal device. This will cause overhead so not implemented for now
    Ideally we only use f32 as output audio format, and cast any type from Android to f32 data stream. I think most audio devices support f32. It makes resampling and other DSP methods easier.

@teamclouday teamclouday marked this pull request as ready for review December 6, 2024 03:52
@teamclouday teamclouday merged commit 09807f2 into main Dec 6, 2024
@teamclouday teamclouday deleted the improve-buffer branch December 6, 2024 04:50
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