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

Stream Audio #34

Open
sigmaSd opened this issue Feb 7, 2021 · 3 comments
Open

Stream Audio #34

sigmaSd opened this issue Feb 7, 2021 · 3 comments

Comments

@sigmaSd
Copy link
Contributor

sigmaSd commented Feb 7, 2021

Hello @lemunozm,

I think you missed some conversation here #23 so I'm just opening a new issue.

I'm testing https://github.com/libcala/wavy crate to add this function, here is the current state https://github.com/lemunozm/termchat/compare/master...sigmaSd:audio_wavy?expand=1

This works but the major problem is that it currently spins the cpu a lot and slows down the entire program.

Maybe you can take a look at it and see if there is something to improve, or if this is a limitation of message-io maybe? since its flooded by audio message it can't keep the app responsive?

If its the latter case maybe message-io should offer some dedicated channels for huge data like streaming (since its the same problem with video but I guess streaming video sends less data?)

@lemunozm
Copy link
Owner

lemunozm commented Feb 7, 2021

Hi @sigmaSd, Sorry for not answering, I currently have a lot of open fronts in mind, and because this part required somehow goes deep, I left to the next week.

By the way, I announced termchat in reddit and it has seemed to have a warm welcome, in part to your contributions with the file transfer and streaming. So thanks again for your work!

I like to be tracked this feature with a new issue! As soon as I'm free I get with it.

@sigmaSd
Copy link
Contributor Author

sigmaSd commented Feb 7, 2021

Glad I helped!

No problem, I just reopened this issue so we remember this feature xD

Back to this issue, I prefer if I could use https://github.com/RustAudio/cpal just for the advertised android and windows support but for some reason I could not make it work on my pc, (no sounds from the speaker) that's why I used wavy here.

If I have more breakthroughs I'll post it here.

@lemunozm
Copy link
Owner

Hi @sigmaSd, I took a look at the changes. I like it a lot!

I will investigate the performance issue. Some days ago I was thinking about what you just comment about open a way to write/receive stream data without forcing it to make a message. I am working on some big refactorizations in message-io to offer this feature and others like adding new transports easily. I hope I could contribute from the basis to this performance increment.

Could you open a PR with this change to make better traceability in the comments/changes?

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

No branches or pull requests

2 participants