Conversation
very big commit ik but whats done is done
It is not justified for release binaries as it takes up ~20MiB of RAM. If UB or any RTE were to occur it is logical to move onto a debug build with INLIMBO_STACK_TRACE_DUMP=1 to print it.
from this commit on the default place for logs will be ~/.cache/inLimbo/logs/core.log. Also it was stupid to have LOG_ERROR for a small but essential util like getHomePath, it now throws RTE instead. Some other misc refactors were made.
Accidentally added some webview frontend test code, reverted in this commit.
instead of creating a stupid x dimensional table, we are going to flatten it to 1D instead. Removed some template instantiations too but more can be done to better this.
future commits i will add a flag to enable different frontend builds this is annoying
Added isTrackFinished method in AudioEngine that will let us know when playback is over, then we can simply invoke gapless or forceful next track. resolved double advances due to releasing mutex due to `getSoundPtrMut` and such methods. Removed the TID + EPS all that logic Complete overhaul on ftxui UI and new screens
future commits will also keep adding docs via comments or markdown.
now telemetry requires a minimum playback event time so it commits plays based on this requirement. (if playback time <= required then it drops listen and thus isnt counted for analysis)
previous commit changed how total listen time was calculated (it only worked as a committed metric) which was useless, so reverted that change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current codebase is quite messy and interoperates between the frontend and backend hastily that become harder to fix and add features to.
With this branch (develop), the entire model of being changed with:
miniaudiowithALSA+FFmpeg (libav)for pure native linux audio management (abstraction in MA was quite unnecessary)There is still quite some work that needs to go into this, but a small PoC is ready in the project that will gradually be worked upon until a stable TUI emerges.
Things pending:
TODO (IMPORTANT):
Stable TUI with basic music player controlsSmallStringonly tested and benched so far)Add a minimum playback time to register into telemetry (currently as soon as we hit play it will count it)TO BE DONE (TBD) (in the future after draft reaches stable):
AudioVisualizerwith fftw3 with frontend agnostic visualization capabilitiesDONE:
HTTPSClientthroughlrclib.net's API (along with a logical cache flow to avoid query spam)pipewire,pulseaudio, etc. (alsa is set by default)config.toml)MakefileMakefilefor everything pertaining to the project (fmt, tidy, install-deps, etc.)KNOWN BUGS:
Upon seek spamming near the end of a song, the gapless next logic breaks and keeps adding tracks to the audio buffer without playing anything - buffer stays in previoustidbut metadata (by default MPRIS) and ring buffer contains far more looked ahead songs. (seems to be a frontend implementation and logical flaw). Note that this happens sometimes even without seeking but that is quite rare and I have only found this like once or twice.A bit more about the above issue since that is really the only issue I have found so far: I have added more atomic guards to the function resposible forauto nextand within the status loop of the frontend there is a forceful check if the position of the song is GTE to length of the current track, if so disregard the auto next just play the damn song. This should have fixed it idk there is still a goldilocks zone sometimes where I dont even seek and just let it play, but it just gets stuck? Not sure how else to explain it.There was a problem with double advances due to releasing the mutex when invoking
getSoundPtrMut,getSoundPtr, which was releasing, so fixed it by not releasing the lock and using an atomic var to find if track has ended byAudioEngineIt seems to be working fine I have not encounted any issues after testing.
My guess on this is that there are a lot of "hot" allocs that happen at the beginning particularly
std::stringand the like along with maps (ankerl). This slowly reduces over time as those allocs are freed and only the frontend is invoking allocs and logic? Again this is just my guess and I will do a thorough massif / heaptrack check with this to understand more possibly.During updating telemetry, it sometimes goes to fallback<unknown>fieldNot all fields go to fallback (ex: song title will be correct but artist will default to fallback or vice-versa). So not really sure how this error occurs.SOLUTION:
Did not map
SongIDtoArtistIDso ofc it didnt work. Needed to add a umap for that - although in the future if we want to create more relations the no of maps required will become N * M, so realistically we will focus on the following relations:SongID -> ArtistID [DONE]
SongID -> GenreID [TBD]
This project is moving forward only as per my free time and motivation, so turbulence in commits and progress is to be expected.