Commits
- Commit:
fc4a38afafeec3a23f264e76659b3405d2d7cc48
- From:
- Omar Polo <op@omarpolo.com>
- Date:
don't set the imsg fd as blocking mode
just do a poll before imsg_read in player_disptach to wait for data to
read. It's not performance-critical code, so this is fine.
If it were important not to do an extra poll(2), for example when we're
called is called after player_pendingimsg we already know there's
something to read, we could move the polling in the case `n == 0' below.
- Commit:
a975dca965d92cd6af18a82629b597668e1d69d8
- From:
- Omar Polo <op@omarpolo.com>
- Date:
don't send the song' path to the player process
we're not relying anymore on the file extension, so this information is
useless for the player.
- Commit:
239029b61f575847650021a5b4904ed426a2e9e4
- From:
- Omar Polo <op@omarpolo.com>
- Date:
don't call player_sendeof on IMSG_STOP
the refactoring introduced this error where we call report an EOF upon
IMSG_STOP, making the player infinitely loop.
- Commit:
bf19b03e6400fa3a7573b0ba4fd057767f0adc22
- From:
- Omar Polo <op@omarpolo.com>
- Date:
add a simple filetype detector instead of relying on file extension
just a bit of "magic" :)
Flac are easy, they always start with "fLaC". mp3 are weird because
they either start with "ID3" (but this theoretically only ensures that's
a tagged file, not an mp3) or 0xFF 0xFB.
Ogg Opus should have a magic sequence "OpusHead" somewhere near the
start of the file but also have the ogg' "OggS" magic bytes. I hope
it's enough to distinguish between Ogg Opus and Vorbis.
Another option would be to refactor play_oggvorbis/opus to not close the
file on failure and try in cascade the play_* functions, but it's more
complex and this solution seems to be enough.
- Commit:
184600a89b139d44c106a366c351bee471185137
- From:
- Omar Polo <op@omarpolo.com>
- Date:
don't leak file descriptor on player_playnext failure
- Commit:
06412529c452e3c4c9df9a4fcc42c2ccecd8364b
- From:
- Omar Polo <op@omarpolo.com>
- Date:
refactor player_playnext: return status code
let the caller decide to call senderr or sendeof.
- Commit:
f002c42a6d7c2ffeb20816a0638c7095d99e0468
- From:
- Omar Polo <op@omarpolo.com>
- Date:
be slightly more informative on failures
- Commit:
251e00ff6d49ac88dee01a6bde35f26ac1680d3a
- From:
- Omar Polo <op@omarpolo.com>
- Date:
pledge audio too
while for my particular use-case this has always worked with only "stdio
recvfd", sio_open(3) mentions that if no further sio_open calls are made
all pledges can be dropped except for "audio", so let's keep it.
- Commit:
cd941eebd3cb53649a4e06fe982bafcf5e6a2ebf
- From:
- Omar Polo <op@omarpolo.com>
- Date:
remove the got_stop hack
now player_playnext has enough information to decide wheter to call
player_senderr or player_sendeof.
- Commit:
5a4b30307238cd3830c084656fe79c1f00eebcde
- From:
- Omar Polo <op@omarpolo.com>
- Date:
drop functions prototypes private to player.c and move hdl there too
- Commit:
2139c525dbcd33e08c153dd8dbe75cd1fddf6b30
- From:
- Omar Polo <op@omarpolo.com>
- Date:
refactor the player_shouldstop/sio_write dance in a function
- Commit:
a728254f63b163e7690e40990d9e039506203eb9
- From:
- Omar Polo <op@omarpolo.com>
- Date:
change the log debug string for player_setup
now it includes all the params, not only the rate
- Commit:
25cb72fb3fbbe1886355dcff1cec5950150bc40c
- From:
- Omar Polo <op@omarpolo.com>
- Date:
fix player wrt unknown files
- Commit:
e24324f1e5f50d7f1ceb3f8ae4c5513fa27d89f5
- From:
- Omar Polo <op@omarpolo.com>
- Date:
allow changing sample bit size
- Commit:
7fc831ea00ec72448ae3f54f24b047528daa61d8
- From:
- Omar Polo <op@omarpolo.com>
- Date:
support setting the number of channels for flac and vorbis