Comments (13)
@SebastJava Thank you for taking the time to investigate it. I don't remember exactly. There may have been several refactors since then. Perhaps it is best not to rely on my vague memory. If I were starting afresh, I'd start here:
Most likely, it is broken. You can also look at SoundPlaybackService
, where it is called to update a StateFlow
on which the UI elements rely.
from android-app.
Hey @SebastJava! Thank you for taking the time to dig deep and find the exact steps needed to reproduce this. I'll resolve it as soon as possible, perhaps over the weekend.
I hope I am not wasting your time.
You didn't. Your input has been very helpful!
from android-app.
@SebastJava I've added a fix to resolve this issue. Since it changes a few components' behaviours at the implementation's lowest level, I'm sceptical that it may cause unwanted side effects. Nevertheless, I've released a new version, 2.5.5, with this fix, and it should be available shortly on GitHub releases, F-Droid and Noice beta on the Google Play Store.
from android-app.
Thanks !
from android-app.
Thanks for reporting this! iirc, it came up during the implementation, and I had been lazy about it. Nonetheless, I'll try to fix this as soon as possible.
from android-app.
Thanks for this quick reply! I was currently trying to investigate what causes this bug to occur, exactly. Trying to find the exact steps to reproduce... Because this is that kind of mysterious bug that I can talk about, but I am not able to consistently reproduce it every time...
So, my question is: do you have a clear idea of the "steps to reproduce"? Or should I keep trying to find the exact combination of steps to reproduce this bug?
from android-app.
@SebastJava I tried reproducing it myself! I think what happens is when you play a preset, not all sounds will be in the PLAYING
state at the same time. A few of them might be in the BUFFERING
state. When you hit stop, the sounds in the PLAYING
state enter the STOPPING
state, while the sounds in the BUFFERING
state directly enter the STOPPED
state. This is important because SoundPlayerManager#getCurrentPreset
and SoundPlaybackService
rely on sound states to find the active preset name, and sounds in STOPPED
won't be part of the active preset. I hope this makes sense!
To reproduce it, you need to hit stop before all sounds enter the PLAYING
state. You can monitor sound states in log messages with the SoundPlayerManager
tag. Can you verify this?
from android-app.
@SebastJava It should be easy to reproduce on a slow network since not all sounds from a preset will be able to buffer adequately to start concurrently.
from android-app.
@ashutoshgngwr I am not really a programmer, but I am willing to learn... Maybe, one day, I will finally find the time, and a quiet environment, and peace of mind, so I can dive into these things more seriously.
I am currently writing this reply on my computer, with the latest Linux Mint Cinnamon OS. But here I am talking about your Noice app on my Moto G Pure cellular phone, with Android 12.
[...] I hope this makes sense!
Yes, I approximately understand your reasoning and it makes sense.
To reproduce it, you need to hit stop before all sounds enter the
PLAYING
state. You can monitor sound states in log messages with theSoundPlayerManager
tag. Can you verify this?
If I understand you correctly, your are saying this bug would only occur when I quickly press "stop", so there are still sounds in the BUFFERING
state... But, from my various empirical tests, I get the feeling it just the opposite. This little bug only occurs when I press "stop" after some time, like after 2 minutes or so. I never get this bug if I just play my preset for 10 seconds and then stop.
And... what makes it even weirder is it seems I only get this bug with my custom presets.
This one: https://trynoice.com/preset?v=1&n=Cascades&s=%7B%22brownian_noise%22%3A1.0%2C%22pink_noise%22%3A0.8%2C%22water_stream%22%3A1.0%2C%22white_noise%22%3A0.4%2C%22wolves%22%3A0.5%7D
from android-app.
You can monitor sound states in log messages with the
SoundPlayerManager
tag. Can you verify this?
Sorry, I have trouble understanding this. I don't know how to find any log messages on my Moto G Pure Android 12 phone. Help please!
from android-app.
Also, I believe my internet connection isn't so slow. I only use this nice Noice when at home. So, I have my own WiFi connection here. And I am the only user on it and thus I am pretty sure I always get the same steady ▼15 Mbit/s || ▲10 Mbit/s...
from android-app.
Ah, okay, sorry, I had many things on mind at the same time. I think I can quickly find answers on how to get these Android system logs. Still, your help would be appreciated, but otherwise I will probably just find some answers on Google... :)
from android-app.
@ashutoshgngwr All right ! I think I may have finally found the exact strange steps to reproduce...
To reproduce
- Go to the Library.
- Choose at least one sound that repeats seamlessly, such as pink or white noise.
- Choose one sound that repeats with a random delay, such as wolves or thunder.
- Save your preset.
- Just listen and wait for at least 60 seconds, then press stop while no randomly delayed sound is playing, i.e. no wolf howls or thunder sounds.
- See? "Unsaved preset" is now displayed for 5 seconds, during the fade out...
Of course, I can't be sure, but I think I found it. I hope I am not wasting your time. The truth is I am a bit reluctant to dive into this big system logs investigation. It would probably be a fascinating adventure, but I currently have other concerns on my mind. I am busy with other things. This system logs investigation probably sounds easy for you, but the thing is I would have to start by installing the big SDK. This looks like a big adventure. Maybe later?
from android-app.
Related Issues (20)
- NonFree lib in F-Droid build HOT 1
- Add quick mixer view HOT 1
- Only working with network connection HOT 2
- Unable to play multiple sounds at once HOT 2
- Navigation text is too long HOT 5
- Sleep cycle aware alarms
- Replace all vector icons with their round variants
- Longer sound fade in/out HOT 2
- Add master volume control
- Add reference HOT 1
- Offline access HOT 3
- Add editing for presets
- The timer doesn't work correctly HOT 4
- Ability to set alarm duration HOT 4
- [BUG] Crash, when starting the app HOT 1
- App crashes after signing in
- Design issue: The background images in the library have a vibrant, confusing, saturated green background color. (see screenshot) HOT 2
- Enhancement: Bazel Build Migration
- App Crashes when Downloading Sounds HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-app.