gdelataillade / alarm

A Flutter plugin to easily manage alarms on iOS and Android
https://pub.dev/packages/alarm
MIT License
132 stars 86 forks source link

Sound cuts out in the foreground #140

Closed synstin closed 9 months ago

synstin commented 10 months ago

Alarm plugin version 3.0.6

Describe the bug When the alarm goes off in the foreground instead of the background, the sound I set is cutting off in the middle instead of playing from start to finish.

To Reproduce Steps to reproduce the behavior:

When an alarm goes off in the background, the sound is played in full from start to finish. ex) ding----------end

When an alarm sounds in the foreground, the sound is interrupted. ex) ding----end

UPDATE When I listen to the sound on my airpods, the sound doesn't cut out in the foreground, it's only when I listen to the speakers in the foreground that the sound is cutting out. It's not a speaker issue on my device.

Device info Provide device info (Manufacturer, OS version, ...) iPhone 15, iOS 17.2

gdelataillade commented 10 months ago

Hi @synstin

Thanks for sharing your feedback.

I'm not able to reproduce your issue. I will investigate on it though. Let me know if you gather more information.

gdelataillade commented 10 months ago

Hi @synstin

Does your issue happens all the time ? Do you know if something on your device could cause the interruption ? Like another audio player or something ?

Any information could be a great help. Thank you in advance.

synstin commented 10 months ago

@gdelataillade

It happens all the time. No other audio player is playing. This did not happen in version 2.x. Thanks.

gdelataillade commented 9 months ago

@synstin

Do you have any error logs in your debug console ?

synstin commented 9 months ago

@gdelataillade No error logs appear. Thanks

gdelataillade commented 9 months ago

@synstin

synstin commented 9 months ago

@gdelataillade It seems to happen with very short sounds. This is the sound I tested. Thanks.

https://drive.google.com/file/d/1OUyoNGn7F-jznzSQi16AhxODxE_vOIed/view?usp=drive_link

gdelataillade commented 9 months ago

Hi @synstin

I imported you short audio asset in my example app to test if the sound was cutting out but I was still not able to reproduce your issue...

Do you make your ding sound loop or not ?

synstin commented 9 months ago

@gdelataillade

It is not repeated. Are the sounds you hear by just running the file I uploaded match the sounds you hear through the alarm?

gdelataillade commented 9 months ago

@synstin

Yes, well I could hear a quick ding sound, like the one you shared. With no cut, whether I was in foreground or background.

If the issue persists and no solution is found then maybe you could add some extra silent audio at the end of your ding audio to make it a bit longer.

synstin commented 9 months ago

@gdelataillade Yes, I'll work on that, thank you for your help.