chiark / gitweb /
Merge from Mark's branch.
authorrjk@greenend.org.uk <>
Sun, 8 Jul 2007 13:35:16 +0000 (14:35 +0100)
committerrjk@greenend.org.uk <>
Sun, 8 Jul 2007 13:35:16 +0000 (14:35 +0100)
commit9d5da57642eeaf8e2b68f18bb1e6f56bfc7510b9
tree64cdb333f428039fdfd2bf911f56bb5101f83287
parentb415c101ac12d0e0ffe8b497bdff5390fa90d7fe
Merge from Mark's branch.
    revno: 9
    committer: mdw@distorted.org.uk
    branch nick: disorder
    timestamp: Sat 2007-06-09 12:58:16 +0100
    message:
      server/speaker: Wake up on POLLERR on kidpipe too.

      Ooops.  The theory was that the speaker process would notice an EPIPE on
      its kid pipe and respawn its kid.  Unfortunately I don't understand
      poll(2) enough, and failed to listen for POLLERR, so in fact the speaker
      goes into a tailspin if its kid dies.
    ------------------------------------------------------------
    revno: 8
    committer: Mark Wooding <mdw@distorted.org.uk>
    branch nick: disorder
    timestamp: Wed 2007-05-30 11:56:52 +0100
    message:
      Support streaming to external process.

      Introduce two new configuration variables:

* speaker_command: Shell command to pipe audio to instead of using an
  ALSA device.

* sample_format: The sample format expected by this process in the
  form BITS/RATE/CHANNELS -- each integers, except that BITS may be
  suffixed by `b' or `l' for big- or little-endian respectively.  The
  default is 16/44100/2.

      If speaker_command is unset, everything is as it used to be.  If it's
      set, however, disorder-speaker will resample its input (using sox) to
      conform to the desired format if necessary, and pipe the result to the
      command's stdin.  Only one speaker_command is run at a time (respawned
      automatically if it quits), and it receives the audio data of many
      tracks.

      An example command (and the reason I did this grim hack):

    lame -h -r -s44.1 -b128 -x -mj --preset standard - - |
      ices -c /etc/disorder/ices.conf >/dev/null

      re-encodes as an MP3 stream and feeds the result to my IceCast server.
lib/configuration.c
lib/configuration.h
server/speaker.c