How do I start building a music player that supports flac?
I'm doing a CS degree but I feel like it's worth my while to actually be able to make shit and not just balance trees.
I'm pretty comfortable with programming in general but I've never made much with a UI or made much that's actually useful. I want to design a music player just as a learning project mainly.
Where do I get started?
>>59666397
Audio is one of the most fucking annoyingly fickle things to work with in the entire realm of digital media, just giving you a heads up.
>>59666437
as if video is any easier
You want to do something useful? Port MPC-HC's UI to mpv. Make sure to set the keybinds to MPC-HC's defaults while you're at it.
>>59666445
In video there is no digital-analogue interface like in audio.
>>59666460
mpv has a significantly better UI than MPC-HC
>>59666397
Here is an idea, make a foobar2000 like linux/OSX player. At least something that allows you to set library folders and browse trough the actual folder structure to add music to playlist inside the player itself.
>>59666497
>no right-click
Were you writing it for Mac?
>>59666524
that's what I was thinking but how do I start
>>59666548
yes
>>59666397
Import a library.
You make a GUI with something like QT and use libflac for the actual decoding.
>>59666445
When you render a video, you have to draw a new frame about 24 times a second. That's a frame about every 0.042 seconds.
When you output audio, you need to play a sample about 44,100 times a second.
>>59667334
m8 you just submit samples to the hardware in bulk and the hardware takes care of that for you.
>>59666765
>>59666725
literally just this
>>59667422
We need to write everything from scratch though. Reusing other people's code like sound drivers or whatever is like cheating.
>>59666397
https://xiph.org/flac/download.html
https://www.qt.io/ide/
>>59667453
Why do you?
Besides, I said the HARDWARE takes care of the timing, not the driver. That would be retarded.
>>59667334
These are the most common frame/sample rates, but you have to be able to handle others in your media player.
>>59667453
The fact that you're saying this indicates you're not ready for this project quite yet.
>>59667453
>using hardware you didn't develop and forge independently
botnet
>>59666397
If you want to implement everything by yourself try to make a wav player or another format that is only pcm data with no compresion before starting with ogg or flac.