Live data from Hacker News

I Built My Own Audio Player

nexo.sh

111–120 of 209 posts

Re: I Built My Own Audio Player

#111
post #38

Earlier quoted context omitted.

The solution I found after approximately two months of struggling with this problem: you have to generate an audio file that is a few seconds of silence, play it on a loop, and play it at the same time as the actual audio file you want to play (via separate audio elements, or an AudioContext). Specifically I believe you need to make sure the silence is “playing” at track boundaries for the real audio, so there is nev…

Does iOS let you play multiple audio at the same time?

It works on iOS 18. Safari’s audio support was pretty rough on earlier versions, especially <17, but I didn’t need to support those for my project.

Re: I Built My Own Audio Player

#112
post #38

Earlier quoted context omitted.

The solution I found after approximately two months of struggling with this problem: you have to generate an audio file that is a few seconds of silence, play it on a loop, and play it at the same time as the actual audio file you want to play (via separate audio elements, or an AudioContext). Specifically I believe you need to make sure the silence is “playing” at track boundaries for the real audio, so there is nev…

How do you even accept to use/and develop for a device that forces you to do that?

Apple makes webapps/PWAs hard because they want you to make a native app instead.

Re: I Built My Own Audio Player

#113

I still use the Apple Music app with my own local files. I turned off Apple Music (the steaming service), loaded everything into Apple Music (the app on macOS). I then plugged my phone into my laptop like it was 2007 and synced it over like an iPod. Everything works as expected. My music doesn’t change so much, so syncing hasn’t been an issue. I get a certain hit of nostalgia when syncing over the wire as well.

Automatic wi-fi syncing to iTunes still works fine as far as I know.

Re: I Built My Own Audio Player

#119
post #71

> Initially, I avoided Swift because of my previous experience with it […] without native async/await at that time, writing concurrent code compared to Go or JS/TS felt clunky and boilerplate-heavy. I have to disagree. Async may makes concurrent code easier to write, but also less simple to reason about as it grows. In a complex async codebase, I find it harder to reason about code flow and concurrency. If the goal i…

But for his usecase, this most likely won't be an issue as he just wants simple audio player.

Re: I Built My Own Audio Player

#120
I was hoping the article was going to be about a physical device as well as the software to manage and play songs. A few years ago I wanted to get my 10 year old son an mp3 player – he's really into listening to music but wasn't ready (still isn't) for a phone. I was shocked by the state of the mp3 player options. When Apple discontinued the iPod they created a huge vacuum that no one seems to have filled.

I think the iPos shuffle (usb stick form) is still the best mp3 player I ever had – it was small, pluggable without extra cords, and battery lasted a really long time. It didn't have a screen to browse music but that was part of the idea – just let the shuffle do its thing. Even this relatively simple concept has not been replicated in the hardware market.

People will say it's not a hardware problem but a software/drm issue. I think that's a real shame. I wish there were a good, inexpensive, portable device that would just play my music.

Post reply on HN