Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Jul 15, 2012
  1. @grefab

    Initiating resync when receiving strange packet

    grefab authored
    The packet type 0x56, sequence number 0, containing 4 bytes (the first two are the sequence number of the previously requested packet) initiates a resync. Not sure what this packet is supposed to do, but it occurs after heavy requesting resending of packets. Seems to be an out of sync situation, so resyncing is not the worst idea.
    
    Signed-off-by: Gregor Fabritius <gre@g0r.de>
  2. @grefab

    Fixed Issue #147: Segfaults on ShairPort version 0.05 C port

    grefab authored
    When requesting resend of packets a lot, iOS sometimes sends a packet with type 0x56 (Reply to resend request), but with sequence number 0 and length == 4. This short length leads to memory corruption later on when processing the packet: alac_decode() expects at least 16 bytes for AES IV. Therefore the segfault.
    
    This fix ignores packets with length < 16, as seen in another implementation here:
    http://fossies.org/dox/mythtv-0.25.1/mythraopconnection_8cpp_source.html#l00555
    
    Please be aware that this just fixes the segfault. The suspicious packet seems to be an information of an out of sync situation, so it may deserve further attention.
    
    Signed-off-by: Gregor Fabritius <gre@g0r.de>
Commits on Apr 15, 2012
  1. @choongng
Commits on Feb 25, 2012
  1. @toofishes

    hairtunes: implement a simple LCG-based RNG for dithering

    toofishes authored
    We are calling out to libc's rand() function, which has significant
    overhead, especially since we are calling it 88200 times per second
    (2 channels * 44100 samples).
    
    Implement a very simple linear congruential generator in our code that
    is plenty good enough for dithering purposes, and small enough for the
    compiler to optimize and inline.
  2. @toofishes

    hairtunes: simplify and reorganize some floating point operations

    toofishes authored
    The math operations are all equivalent, but are simplified a bit for the
    benefit of processors with slower floating point performance.
    
    * Don't use float casts when we need to eventually convert to double
      precision anyway.
    * Use multiplication instead of division when possible.
Commits on Feb 24, 2012
  1. @toofishes
  2. @toofishes

    Use the audio buffer mutex appropriately

    toofishes authored
    We need to use this any time we write to or access any of the
    audio-buffer related variables. This also removes the need to use
    'volatile', which cripples the compiler optimizations.
  3. @toofishes

    Use a pthread mutex around the volume settings

    toofishes authored
    Using the `volatile` qualifier in multithreading code is never the right
    answer. Mutexes should be used as was attempted with the audio buffer
    code. Here, we implement a new mutex for the volume and fix_volume
    globals, and grab a lock on it when necessary, which is for both reads
    and writes.
  4. @toofishes

    Return the correct value from biquad_filt()

    toofishes authored
    If you turned set `debug = 1` in hairtunes, you'd quickly get a mess of
    debug messages that showed bf_est_drift in bf_est_update() going quicky
    out of range toward a float NaN value (usually negative). Clearly the
    presence of this `out` variable in biquad_filt was meant to be used, not
    marked as unused.
  5. @toofishes

    hairtunes: use static keyword appropriately

    toofishes authored
    This allows the compiler to do a much better job on this file, as it
    currently can't inline most of the functions because they are
    technically visible outside the file. Mark most functions and variables
    static to let the compiler work.
  6. @toofishes

    Don't require extern usage of frame buffering value

    toofishes authored
    This makes things a bit cleaner and easier to grasp.
  7. @toofishes

    Improve resending of frames (and avoid missed frames)

    Stef Simoens authored toofishes committed
    - when requesting a packet, do not request an already received packet
    - move the last-chance resend to buffer_get_frame
    - check more often for missing frames
      own checks show that some frames need to be requested up to 4 times
      on bad connections
Commits on Nov 10, 2011
  1. @juhovh
Commits on Oct 10, 2011
  1. Send "last-chance retry" only once

    Stef Simoens authored
    The last-chance resend was sometimes fired up to 6 times (probably while
    receiving multiple new packets while playing the same buffer-data).
    
    The following patch corrects this: only one retry is sent out.
    For this to happen, I change abuf->ready to -1 ("1 retry sent out") and
    by changing the other comparisons of abuf->ready to != 1.
    
    Probably, this could be improved, by implementing a first check at t-30,
    t-20, t-10, ...
Commits on May 23, 2011
  1. @osheroff

    Configurable buffer size, only for standalone

    osheroff authored
    shairport just yet.
  2. @osheroff

    Fix for when the writer thread kicks off before

    osheroff authored
    the reader thread (manifested as an initial "stutter"
    before the buffer filled adequately)
Commits on May 15, 2011
  1. Merge pull request #79 from miracle2k/master

    authored
    Support older versions of libao
  2. @miracle2k
Commits on May 11, 2011
  1. @mrpippy

    hairtunes.c: Fix "'struct in_addr' declared inside parameter list" wa…

    mrpippy authored
    …rnings on OpenBSD
    
    Rearrange includes to fix warnings thrown on OpenBSD 4.9/i386
Commits on May 9, 2011
  1. @wgoossens
Commits on May 1, 2011
  1. @abrasive

    Make clear what the buffer settings are for. Remove oversized default…

    abrasive authored
    … buffer, given the START_FILL used for synchrony by whoever that was.
  2. @abrasive

    Fix issue 56, size bug.

    abrasive authored
Commits on Apr 30, 2011
  1. @Andywebs
Commits on Apr 23, 2011
  1. @mflint
  2. @mflint
  3. @abrasive
Commits on Apr 19, 2011
Commits on Apr 18, 2011
  1. @mflint
  2. @mflint

    pipe output now handles SIGPIPE gracefully, closes file handle, re-op…

    mflint authored
    …ens file when another reader appears
  3. endian fix as reported in #27

    authored
  4. cleanup

    authored
  5. cleanup

    authored
  6. cleanup: remove PortAudio support

    authored
    This was discussed in some of the earlier commits. PortAudio doesn't give any real advantages over libao and libao is at least as portable as PortAudio. And we should try to keep the code clean.
Something went wrong with that request. Please try again.