Commits
- 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:
f474712b0a5c634ba652dd37eb674e996ed39a8d
- From:
- Omar Polo <op@omarpolo.com>
- Date:
use the standard Ds width for the options listing
- Commit:
1fe59675359f3dad4621af22aa441b72a9277645
- From:
- Omar Polo <op@omarpolo.com>
- Date:
we're on -current now
- Commit:
4c4a91b4329698fb30f125e380c7817bc346f63f
- From:
- Omar Polo <op@omarpolo.com>
- Date:
amused 0.5
* unbreak opus and ogg vorbis
* handle flacs with bps != 16 and/or channels != 2
* speed up `load' a lot (especially if over NFS)
- Commit:
d51201063dfd08d55382bc1848cee7f4662f504b
- From:
- Omar Polo <op@omarpolo.com>
- Date:
add back missing memzero
- Commit:
1dd3b054dd3d8778debf24bb32cc61ff06e3ee42
- From:
- Omar Polo <op@omarpolo.com>
- Date:
use a more readable strncmp to look for prefixes
also while here stick an `else' before the second clausole. We're
supposed to trim out only '> ' and ' ', but the missing else would
also trim out ' ' after a '> '!
- Commit:
c00c1428ccaedc2d63d9d489c00d796d5718f615
- From:
- Omar Polo <op@omarpolo.com>
- Date:
get rid of realpath during load
it has a non-ignorable cost over NFS (sdk@ reported ~30 seconds to load
64k songs, and up to 5 minutes over wifi!) and don't provide us any real
gain: files can still vanish after being imported or may appear later.
The only advantage of realpath was that it would clean up the path from
segments like "/./" and resolve the ".." components, but that's a minor
issue anyway.
prodded by, discussed with and tested by sdk@, thanks a lot!
- Commit:
d9cc6713e033478672564bf0bf4b273a74576dc3
- From:
- Omar Polo <op@omarpolo.com>
- Date:
typo
- Commit:
950a8581cdd8adab4339e7804b37c938a35bc8ee
- From:
- Omar Polo <op@omarpolo.com>
- Date:
tweak the readme
- Commit:
44cf9512745c3d766924fe86e2ccb1506d7b12a6
- From:
- Omar Polo <op@omarpolo.com>
- Date:
handle flacs with bps != 16 and/or channels != 2
- Commit:
75da56db9b3ec4e213f7b279635feb44fda3cc29
- From:
- Omar Polo <op@omarpolo.com>
- Date:
reuse main_send_player
instead of filling the params for imsg_compose_event.
- Commit:
ae5d742e5f800f8bd0d66b28c1e090b0fb8e1a29
- From:
- Omar Polo <op@omarpolo.com>
- Date:
...and unbreak ogg vorbis too...
i'm seriously shocked at how bad i did the play_* refactoring. missed
too many details.