Commits
- Commit:
0a53bd62d11ed31ce71da1fc9993bc25a6c93755
- From:
- Omar Polo <op@omarpolo.com>
- Date:
switch from libevent to a smaller, thin wrapper around poll()
libevent is a very cool library, I like its APIs and enjoy using
it. However, for amused it is maybe a bit too much since it doesn't
deal with too many file descriptors. Amused only needs to monitor
one fd for the player process and the currently connected clients.
Given that it runs per-user locally, having more than a dozen of
fds open is very, very rare.
- Commit:
b02dadd38071fc5f6fec5241c805077e7a5b818d
- From:
- Omar Polo <op@omarpolo.com>
- Date:
cache audio_nfds()
ALSA' snd_pcm_poll_descriptors_count() can fail with -EPIPE after
an underrun (e.g. after a pause), so we can't call it directly like
this. It's also a bit sloppy to always call audio_nfds(), so instead
save the (initial) value returned and pass it to the various
functions.
Issue reported and fix tested by phoebos (ben [at] bvnf [dot] space),
thank you!
- Commit:
578f8d0cb8038f6ef45368b7d706298223ba5682
- From:
- Omar Polo <op@omarpolo.com>
- Date:
adjust copyright years
- Commit:
e3317c86113ff236272f6bf1b88cacfe54103be3
- From:
- Omar Polo <op@omarpolo.com>
- Date:
fix my email address
used @openbsd.org initially by mistake and got copied around in
most files. Since this has nothing to do officially with the OpenBSD
project, use my own email address.
- Commit:
06ceb3767eb7e480de05cd50f4fbaf75fb3322a2
- From:
- Omar Polo <op@omarpolo.com>
- Date:
split out sndio-specific parts to audio_sndio.c
This hides the libsndio bits behind a small audio_* API for which in
the future we may provide multiple implementations.
- Commit:
3dd907310bab777213b20bd814d72faba91e40ae
- From:
- Omar Polo <op@omarpolo.com>
- Date:
enrich `amused monitor' reported events
The monitor mode now has access to some additional information other
than just the name of the event.
The `mode' and `seek' events now report the mode status and the
position/duration respectively, allowing consumers of `amused monitor'
to show correct and coherent information.
It helps in particular applications like `amused-monitor' (in contrib/)
that show a progress bar for the current song. Before, they had to run
their own timers and periodically synchronize using `amused status', now
they can just update the state in the same `amused-monitor' event loop.
- Commit:
9881c98ce0817889c42c9ad4146d7e1db91d7005
- From:
- Omar Polo <op@omarpolo.com>
- Date:
define constants for mode special values and add a toggle value
- Commit:
9fb9424225a739a0fbbfec5d31f21458126fd9c2
- From:
- Omar Polo <op@omarpolo.com>
- Date:
add consume mode
the consume mode implicitly drops the tracks from the playlist when
played 'till the end (note that skipping over a track doesn't trigger
the consume mode - yet?)
- Commit:
4b42d3a3f30acc64f6720bf33c8f6d695577bf74
- From:
- Omar Polo <op@omarpolo.com>
- Date:
pledge early
This changed amused to pledge "stdio rpath" early in main() and then
drop down to "stdio" in ctlaction, by removing the pledge call in
parse. Simplifies a bit the logic and runs more code under pledge.
- Commit:
15aecb89d41f59ac375c7a2a2194ab7cddcaa020
- From:
- Omar Polo <op@omarpolo.com>
- Date:
monitor: fix reported event
rethink a bit which event are reported and when.
- drop 'toggle' event as it's not useful; now 'amused toggle' will
report the play/pause event.
- replace 'flush' with 'load'. there's no real difference between a
flush and an empty load. (also, less event the better)
- some events (next/prev/jump) are reported earlier to avoid possible
issues (when messing around with the playing queue we can end up in
every possible state.)
- report 'seek' only after it really happened (i.e. after the player
process sent the new position.) There's still a possible race here
(we can receive a previous IMSG_POS and think it's the reply to the
seek) but it it's hard/impossible to work around.
- drop 'restart'. we have 'seek' now which is better (and actually
restart is implemented on top of seek.)
- add 'seek' to the default list of events.
- Commit:
68e4f29ee2b7e9e14d8cf147a938ab08a7397d3d
- From:
- Omar Polo <op@omarpolo.com>
- Date:
allow to customize the output of amused status
This add a -f flag (that falls back to $AMUSED_STATUS_FORMAT) to
control which field to print and in which order.
- Commit:
60a09ce7593620b472371bfbca3c11b6ba8d2c81
- From:
- Omar Polo <op@omarpolo.com>
- Date:
implement seeking on percentage of total duration
- Commit:
8d08767078347495fc28f6a97ad1e5e1b3b6f5f2
- From:
- Omar Polo <op@omarpolo.com>
- Date:
reimplement `restart' on top of seek
- Commit:
791d3db313f1f9816c699583c97079efccd408d6
- From:
- Omar Polo <op@omarpolo.com>
- Date:
implement seeking
This adds the internal management of the seeking, as well as the
decoder backends bits.
- Commit:
b9d2a697d18a2b6994f7b611145e7b085a5de49d
- From:
- Omar Polo <op@omarpolo.com>
- Date:
bits, rate and channels are unsigned
match the struct sio_par