-
Notifications
You must be signed in to change notification settings - Fork 110
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
Cross Platform Audio stream not playing #2
Comments
I think the problem is on Android side, Uint16 (16bit PCM) is converted to Uint8 to transfer to dart side, iOS does the same thing but I used "pointer conversion" (withMemoryRebound). I think Android's algorithm should be refactored. I'll fix & test it over a socket. Are you using WebSocket, @dhalloop7 ? |
Yes, @CasperPas I am using WebSocket. |
Dose cross-platform works? |
I am also using socket io |
I tried today ios to ios as well but it won't work for me. Android to Android share byte and play works good for me |
@dhalloop7 could you provide the steps to reproduce the issue? I've tried multiple times with websocket and it's fine as long as it's not cross-platform (I'm working on that) |
I'm working on it and if you guys have any ideas, all contributions are really appreciated |
I am using socket.io for sending and receiving bytes from one device to another. During initializing recorder and player I am using sampleRate At the sender side when I am getting the bytes in the stream I am emitting those bytes with some additional information over the event.
At the receiver side as soon as socket connects I am initializing the player and called method start.
And when I am receiving the data bytes or chunks over the socket I am trying to play chunks as below.
I am also doing trial and error with changing the bit format (8, 16, 32) of recorder and player. You can try by doing it as well. |
@dhalloop7 @RizanPSTU I'll do some extra tests and if it's ok, I'll publish a new version 😄 |
Sounds great. I am trying it now. |
I updated the package, is it working well? |
Yes, I tried from the branch. It's player for iOS to Android but not played for Android to iOS. |
Can you try it again from |
I tried with the |
which devices (iOS and Android) are you using? |
Can we connect over some calling platforms or on Google Meet or Google Hangout? |
I think we can. You can contact me directly via the email on my profile. Both Hangout or Duo works. (please email me first 😄 ) |
I tried with the master branch.
|
1.I think it it's iOS's policy. But I'll double-check that. Thanks! |
I think if you check earpiece issue and route audio through the Speaker only it may solve 1st issue as well. Also, it's great if you provide a method to change the audio playing route i.e. Speaker or Earpiece or any connected device like Bluetooth or Earphone. |
Thanks for your PR! I'm testing it. I'm so freaking busy these days 😅 |
Are you sure it was not worked for iOS? It's worked for me. Can we connect for the same? |
No it's not. I copy-paste your code and tried on my Pixel 3 XL, with my bluetooth earbuds. I'll try again to make sure if it's really working or not. |
I'm making progress with iOS. It can be switched from headsets to built-in devices (both input & output at the same time). But on Android side, only output is switched, it always uses built-in mic for recording even when I change input source value. |
#11 |
@CasperPas I tried it with android device by adding the line |
oh really? so |
Yes. But I observed that I need to keep my device in Ringing Mode. It's not playing audio while it's in silent mode even if keep Media Volume high. That's the issue. @CasperPas |
This is normal on Android and that's a good think actually. You don't want to have phone mode in silent and have something making noise |
Yes, it's like a media application. Even if in Silent mode it's returning Audio with respective to Media Volume |
@dhalloop7 can you help me try to fix it? Really appreciate it 😁 And I think we can create another issue for that. |
@CasperPas Surely I will help you with this. I am also running busy these days. We can create another bug for this issue and close the current one as the cross-platform audio is streaming ;) |
@CasperPas raised PR #13 for if the device is silent or vibrate mode it can play streamed audio bytes. Can you please review and test it? |
Issue Bluetooth Recording CasperPas#2 virlow-voice/virlow-flutter-recorder#2
I am writing code to stream audio data over a socket. It's working fine with Android to Android and iOS to iOS devices. But When I am trying to stream bytes from Android and trying to play on iOS It's not playing the received buffer.
I also noticed that the chunk length received from the plugin is 7156 white from iOS its length is 16386.
The text was updated successfully, but these errors were encountered: