Skip to content
Snippets Groups Projects
  • Matthew Jordan's avatar
    22e62ac6
    app_jack: Support audio with a sampling rate higher than 8kHz · 22e62ac6
    Matthew Jordan authored
    This patch enables the jack-audiohook to cope with dynamic sampling rates from
    and to Asterisk. Information from the channel is taken to derive the channel's
    sampling rate, suiting SLINxx format and frame->datalen.
    
    There are stil a few limitations after this patch:
    * Required information is taken from the channel during initialization as
      the audiohook does not provide this information.
      Audiohook.internal_sampl_rate(...) is set later, but no callback is available
      to inform app_jack.
    
    * Frame.datalen is computed using "rate / 50" assuming a ptime of 20ms.
      There is no internal API available to determine datalen for a SLINxx.
    
    * Ringbuffer size is now dynamic depending on the value of frame.datalen
      (see above) and the number of frames, which are in RINGBUFFER_FRAME_CAPACITY,
      that need to fit.
    
    Review: https://reviewboard.asterisk.org/r/3618
    
    Note that the patch being committed here is based on the patch posted on
    ASTERISK-23836. However, Matthis Schmieder also provided a patch to enable
    this functionality, and that patch is noted below.
    
    ASTERISK-20696 #close
    Reported by: Matthis Schmieder
    patches:
      app_jack.patch uploaded by Matthis Schmieder (License 6445)
    
    ASTERISK-23836 #close
    Reported by: Dennis Guse
    patches:
      patch-app_jack.c uploaded by Dennis Guse (License 6513)
    
    
    
    git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@417360 65c4cc65-6c06-0410-ace0-fbb531ad65f3
    22e62ac6
    History
    app_jack: Support audio with a sampling rate higher than 8kHz
    Matthew Jordan authored
    This patch enables the jack-audiohook to cope with dynamic sampling rates from
    and to Asterisk. Information from the channel is taken to derive the channel's
    sampling rate, suiting SLINxx format and frame->datalen.
    
    There are stil a few limitations after this patch:
    * Required information is taken from the channel during initialization as
      the audiohook does not provide this information.
      Audiohook.internal_sampl_rate(...) is set later, but no callback is available
      to inform app_jack.
    
    * Frame.datalen is computed using "rate / 50" assuming a ptime of 20ms.
      There is no internal API available to determine datalen for a SLINxx.
    
    * Ringbuffer size is now dynamic depending on the value of frame.datalen
      (see above) and the number of frames, which are in RINGBUFFER_FRAME_CAPACITY,
      that need to fit.
    
    Review: https://reviewboard.asterisk.org/r/3618
    
    Note that the patch being committed here is based on the patch posted on
    ASTERISK-23836. However, Matthis Schmieder also provided a patch to enable
    this functionality, and that patch is noted below.
    
    ASTERISK-20696 #close
    Reported by: Matthis Schmieder
    patches:
      app_jack.patch uploaded by Matthis Schmieder (License 6445)
    
    ASTERISK-23836 #close
    Reported by: Dennis Guse
    patches:
      patch-app_jack.c uploaded by Dennis Guse (License 6513)
    
    
    
    git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@417360 65c4cc65-6c06-0410-ace0-fbb531ad65f3
To find the state of this project's repository at the time of any of these versions, check out the tags.