flutter-sound-stream icon indicating copy to clipboard operation
flutter-sound-stream copied to clipboard

Some additional issues

Open mowgliho opened this issue 3 years ago • 8 comments
trafficstars

Thanks for the library! I've noticed a couple of issues:

  1. Doesn't play well with flutter_sound, as sound_stream and flutter_sound seem to fight over resources
  2. when playing, becomes unresponsive to volume changes on Samsung devices (always full volume, doesn't change even if muted)
  3. On iPhones, doesn't work with AirPods, is too quiet on phone speakers, although works well with wired headphones. (also see issue #16 )
  4. Also on iPhones, crashes when plugging headphones in and out.

Thanks again!

mowgliho avatar Jan 20 '22 05:01 mowgliho

Actually nvm: i looked into flutter_sound and i could get the mic streaming working immediately; so i'll try and implement that. it's unfortunate that this repo looks abandoned despite it being great imo.

hi mowgliho, unfortunately i dont have an answer to your question, but did you get mic streaming to work on iOS? if so may i get your sample code; i previously had this working, but it has since stopped working for me on iOS and i have no idea why (zero error logs), and the listener never fires off; may i also know your env. versions, i'm using flutter 2.8.1 with macOS Monterey 12.1. thanks in advance

quickratio avatar Jan 20 '22 10:01 quickratio

Thanks for the quick reply!

  • I made a quick little repository here to look into this stuff.
    • Records with sound_stream
    • playback with either sound_stream or flutter_sound
      • for sound_stream playback, I found that your writeChunk function is blocking for the duration of the audio on Android but not on iOS: thus
        • for Android, I split up the audio into chunks and played each chunk sequentially to maintain responsiveness of the app
        • for iOS, I have a timer that can call callbacks or such at the end of playing
  • My issue with flutter_sound is that the sound updates when writing to a stream only come every 400ms or so (I made an issue here, which is why I initially came to your library
  • I'm using flutter 2.5.3 with 10.15 Catalina (but I also had the issue when building on newer versions)
  • For samsung devices, my workaround is to use the volume_watcher package (as volume presses is registered) and then scale the audio bits accordingly, which works.

mowgliho avatar Jan 20 '22 17:01 mowgliho

Hi mowgliho, i am not the repo owner, im just a guy trying to get the packages to work :) thanks for sharing your repo; i was using sound stream to integrate with google speech, but have since swapped it out for flutter sound, if you need an example on that i can send you my code. good luck!

quickratio avatar Jan 21 '22 03:01 quickratio

Oh, oops :P. I actually migrated from flutter_sound to this. In flutter_sound, the listen to stream updates were too slow on iOS, although everything worked perfectly in Android. Are you having this issue as well on iOS with flutter_sound?

mowgliho avatar Jan 21 '22 15:01 mowgliho

flutter sound is working fine for me atm, i'll have a look at your flutter sound issue and see if i have the same thing; sound stream looks abandoned tbh, he hasnt pushed an update in over 6 months, so perhaps better to stay on flutter sound.

quickratio avatar Jan 22 '22 02:01 quickratio

:(

mowgliho avatar Jan 22 '22 21:01 mowgliho

Hi guys. Sorry for the looooong delay. A lot of things happened lately. I'm looking into the issues.

@mowgliho thank you for your reports and the test repo. I'm looking into it. Recently I got a Samsung device so I can confirm that the volume control has no effect. Trying to fix that.

CasperPas avatar Apr 06 '24 17:04 CasperPas

Thanks for looking into it, and I hope that things are going well for you!

mowgliho avatar Apr 08 '24 01:04 mowgliho