zx3no / gonk Goto Github PK
View Code? Open in Web Editor NEWA terminal music player.
License: Creative Commons Zero v1.0 Universal
A terminal music player.
License: Creative Commons Zero v1.0 Universal
Follow up for #18.
Linux support was dropped after 0.1.2
so a custom backend will need to be written.
I have briefly skimmed over pipewire-rs and it looks easier than WASAPI.
Having some trouble with pkg-config but this is next on the list.
Version 4cbfd31
I like the idea of being able to close the player and still listen to music. Sometimes I don't want the UI to be open or I accidentally close it.
MPD has this and I miss it.
Pressing ?
to view binds, would be pretty nice UX and would allow users to not have to reference a markdown file each time they want to check a bind.
Version 4cbfd31
Thread is spawned:
02:43:52 INFO gonk_player\src/lib.rs:197 - 02:43:52 INFO gonk_player\src/lib.rs:285 - Spawned WASAPI thread!
Spawned decoder thread!
Currently they are not cross-platform and there is no way to configure them.
Currently it looks pretty bad. I would like something similar to spotify, where artists, albums and songs are shown seperately.
It may be useful to know which songs/artists are played more. Ordering by query and popularity is probably better.
I would like a way to just search artists, albums or songs.
❯ gonk add D:\Music
thread '<unnamed>' panicked at '"D:\\Music\\DRAGON_BALL_SUPER_OST\\DRAGON_BALL_SUPER_OST\\[180228] 住友紀人 - ドラゴンボール超 オリジナルサウンドトラック -Vol.2- (flac)\\Disc 1\\27 限界突破.flac"', gonk-core\src\lib.rs:687:23
stack backtrace:
0: 0x7ff6485e73c2 - <unknown>
1: 0x7ff6486002ab - <unknown>
2: 0x7ff6485e344a - <unknown>
3: 0x7ff6485e710b - <unknown>
4: 0x7ff6485e9de9 - <unknown>
5: 0x7ff6485e9a6a - <unknown>
6: 0x7ff6484e6ff7 - <unknown>
7: 0x7ff6485ea6a0 - <unknown>
8: 0x7ff6485ea3fd - <unknown>
9: 0x7ff6485e7def - <unknown>
10: 0x7ff6485ea0c0 - <unknown>
11: 0x7ff648615b15 - <unknown>
12: 0x7ff6485304a8 - <unknown>
13: 0x7ff648546658 - <unknown>
14: 0x7ff648546f91 - <unknown>
15: 0x7ff64854c742 - <unknown>
16: 0x7ff648544059 - <unknown>
17: 0x7ff64854708e - <unknown>
18: 0x7ff64854c742 - <unknown>
19: 0x7ff648544059 - <unknown>
20: 0x7ff64854708e - <unknown>
21: 0x7ff64854c742 - <unknown>
22: 0x7ff648544059 - <unknown>
23: 0x7ff64854708e - <unknown>
24: 0x7ff64854c742 - <unknown>
25: 0x7ff648544059 - <unknown>
26: 0x7ff64854708e - <unknown>
27: 0x7ff64854c742 - <unknown>
28: 0x7ff648544059 - <unknown>
29: 0x7ff64854708e - <unknown>
30: 0x7ff64854c742 - <unknown>
31: 0x7ff648544059 - <unknown>
32: 0x7ff64854708e - <unknown>
33: 0x7ff64853367e - <unknown>
34: 0x7ff648612808 - <unknown>
35: 0x7ff6485ca6e1 - <unknown>
36: 0x7ff6485cf383 - <unknown>
37: 0x7ff6485cd246 - <unknown>
38: 0x7ff6485ee97c - <unknown>
39: 0x7ffa5c14117e - BaseThreadInitThunk
40: 0x7ffa5dfe42db - RtlUserThreadStart
I'm guessing it has to do with it having unicode Japanese chars 🤷
Ver: gonk v0.2.0 (built with: cargo +nightly install --git https://github.com/zX3no/gonk.git)
Happens with the v0.12 bin as well
Store queue in database and re-add them at launch.
I updated to latest commit, and everything was working fine, until I ran a gonk reset
and gonk add
, I got this panic:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "The system cannot find the file specified." }', gonk-core\src\vdb.rs:62:47
stack backtrace:
0: 0x7ff65e1b53f2 - <unknown>
1: 0x7ff65e1ce97b - <unknown>
2: 0x7ff65e1b11ea - <unknown>
3: 0x7ff65e1b513b - <unknown>
4: 0x7ff65e1b7d7a - <unknown>
5: 0x7ff65e1b79e0 - <unknown>
6: 0x7ff65e0536c7 - <unknown>
7: 0x7ff65e1b85ef - <unknown>
8: 0x7ff65e1b834e - <unknown>
9: 0x7ff65e1b5db9 - <unknown>
10: 0x7ff65e1b8060 - <unknown>
11: 0x7ff65e1e6dd5 - <unknown>
12: 0x7ff65e1e72f6 - <unknown>
13: 0x7ff65e083860 - <unknown>
14: 0x7ff65e05025b - <unknown>
15: 0x7ff65e0599a6 - <unknown>
16: 0x7ff65e059d10 - <unknown>
17: 0x7ff65e1aa79e - <unknown>
18: 0x7ff65e05370c - <unknown>
19: 0x7ff65e1d66a4 - <unknown>
20: 0x7ffe279f117e - BaseThreadInitThunk
21: 0x7ffe289042db - RtlUserThreadStart
Running:
rm $env:APPDATA\gonk\*.db
did not help either
An icon is not really that important since it's a terminal application. However, I want one.
stack backtrace:
0: 0x7ff7df8cbac2 - <unknown>
1: 0x7ff7df8e4b6b - <unknown>
2: 0x7ff7df8c78ba - <unknown>
3: 0x7ff7df8cb80b - <unknown>
4: 0x7ff7df8ce44a - <unknown>
5: 0x7ff7df8ce0b0 - <unknown>
6: 0x7ff7df8ceb26 - <unknown>
7: 0x7ff7df8ce9db - <unknown>
8: 0x7ff7df8cc489 - <unknown>
9: 0x7ff7df8ce730 - <unknown>
10: 0x7ff7df8fec05 - <unknown>
11: 0x7ff7df8fecbc - <unknown>
12: 0x7ff7df791863 - <unknown>
13: 0x7ff7df791095 - <unknown>
14: 0x7ff7df749510 - <unknown>
15: 0x7ff7df758cf6 - <unknown>
16: 0x7ff7df75c19c - <unknown>
17: 0x7ff7df8c148e - <unknown>
18: 0x7ff7df74d80c - <unknown>
19: 0x7ff7df8ec6d4 - <unknown>
20: 0x7ffd41ee117e - BaseThreadInitThunk
21: 0x7ffd424242db - RtlUserThreadStart
Happens when using the bin, no matter the arguments
Installed with:
cargo +nightly install --git https://github.com/zX3no/gonk.git
There are no new libraries to do this.
https://github.com/main--/replaygain-rs
In ncmpcpp the artist/song name is scrolled horizontally when the string overflows its area.
Small QoL UX thing
While I admit it is funny, I would like something a little more serious.
warning: shared reference of mutable static is discouraged
--> gonk_player\src/lib.rs:299:39
|
299 | if let Some(device) = &OUTPUT_DEVICE {
| ^^^^^^^^^^^^^^ shared reference of mutable static
|
= note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
= note: reference of mutable static is a hard error from 2024 edition
= note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
= note: `#[warn(static_mut_ref)]` on by default
help: shared references are dangerous since if there's any kind of mutation of that static while the reference lives, that's UB; use `addr_of!` instead to create a raw pointer
|
299 | if let Some(device) = addr_of!(OUTPUT_DEVICE) {
| ~~~~~~~~~~~~~~~~~~~~~~~
warning: `gonk_player` (lib) generated 1 warning
Audio starts to stutter when copying large files. Probably something to do with poor buffering in the audio thread.
Half working right now. Shouldn't be too hard to fix.
Lines 27 to 44 in 41d6fde
If the volume is set to 0, the next song will play faster than usual. Once it's finished, it will get stuck until you change the volume.
Sometimes the song name is really long but it's cut off, since the space is equally seperate between title, album and artist. It would be nice if the margins were automatic and allocate space more efficiently.
End of file is used to flag when the decoder is out of packets and will trigger the next song to play. This means seeking can cause the next song to play. I am unable to replicate this issue consistently.
I have a few ideas on what might fix this:
I've tried a few things, Symphonia is so complicated and I'm not even sure if it's my fault or a bug in the library. I can't reproduce it so it's hard to report.
I've been writing a FLAC decoder so hopefully Symphonia can be completely replaced. I wanted to do this anyway because Symphonia has a lot of code and some of the dependencies are slow to compile.
#20 should provide a temporary fix.
Sometimes tags are not in English, you may not know the filename, and/or artist names. Additionally, an option to sort by (sub)directories instead of artists could also be cool.
Symphonia has AAC support so it should be simple to add. However last time I checked it did not work.
gonk/gonk-database/src/sqlite.rs
Line 101 in 41d6fde
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.