Realtime Updates to Audio pipeline

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • foxesden
    Senior Member
    • May 2012
    • 408

    Realtime Updates to Audio pipeline

    I have started integration testing my new DSP plugin and I am slowly fixing issues as I find them. One thing that I have noticed, is that any updates for example a change in pre-amp settings, happens in semi-realtime when I am running my test harness, but when I am running in the LMS environment the pipeline runs really quickly and will often have processing the song well before the song has finished. This gives the impression that the change made hasn't stuck ( it actually will be used when the next song is played). I assume that the stream is being buffered into a temporary file and handed off to the client from there, hence in most cases it makes sense to process everything as quickly as possible.
    I know that many users find this confusing (had comments on InguzDSP, which behaves similarly) as they are seeing the app similarly to a client application, so was wondering whether there are any settings that can be used to process on a more "realtime basis".
  • foxesden
    Senior Member
    • May 2012
    • 408

    #2
    Assuming that the lack of responses means that this is either not doable or a stupid question. So happy to close it.

    Comment

    • bpa
      Senior Member
      • Oct 2005
      • 22622

      #3
      I think it is possible but best done in your plugin..

      LMS uses pipes to buffer usually 32kbytes chunks from source (e.g. files, stream, trasncode outout) to send to output pipe to player.

      You should slow the input and/or output side of your plugin to process at playback speed do not read/process all of source at once. You may hvae the side effect of rebuffering if something happens and there is not enugh data for the player

      In effect treat the input strream like a input live stream (or make your plugin output look like a live stream) - where only a limited number of bytes are available every seconds.

      Comment

      • foxesden
        Senior Member
        • May 2012
        • 408

        #4
        Thanks for that, I noticed that when I pipe the output directly to hardware I am getting numerous audio glitches that I don't get when I stream via the LMS Pipeline, so I think I would probably get similar issues if I tried to control the speed of the convolver process. I have been down so many dead ends and rabbit holes lately that I am happy to pass on this one.

        Comment

        • bpa
          Senior Member
          • Oct 2005
          • 22622

          #5
          Originally posted by foxesden
          Thanks for that, I noticed that when I pipe the output directly to hardware I am getting numerous audio glitches that I don't get when I stream via the LMS Pipeline, so I think I would probably get similar issues if I tried to control the speed of the convolver process. I have been down so many dead ends and rabbit holes lately that I am happy to pass on this one.
          I don't know where your main DSP work is happening (e.g. player or LMS) but glitches (as opposed to buffering) are generally a player issue and not an LMS one - I suspect some player settings (e.g. ALSA settings) may be more critical.
          Sending data unmanaged into a pipe often ends up with a lumpy stream - some sort of flow control is usually needed.

          That said it is generally better to spend as much free time listening rather than developing a "nice" feature that does not affect enjoyment most of the time.

          Comment

          • marcoc1712
            Senior Member
            • Dec 2009
            • 842

            #6
            Is the way LMS it works. It sends as many (transcoded) data to the client as it can receive in its buffer, up to the end of the second song in the playlist after the current.
            __________________________________________________ ______________________
            Author of C-3PO plugin, Squeezelite-R2, Falcon Web interface - See www.marcoc1712.it

            Comment

            • foxesden
              Senior Member
              • May 2012
              • 408

              #7
              Originally posted by marcoc1712
              Is the way LMS it works. It sends as many (transcoded) data to the client as it can receive in its buffer, up to the end of the second song in the playlist after the current.
              Thanks for the info. fortunately I realised that my original approach wasn't going to work so I haven't wasted any time on it.

              Incidentally I see on your C3P0 plugin that you have managed to bypass all the default transcoding paths for an enabled player, are you rebuilding the command table to do that?

              Comment

              • marcoc1712
                Senior Member
                • Dec 2009
                • 842

                #8
                Originally posted by foxesden

                Thanks for the info. fortunately I realised that my original approach wasn't going to work so I haven't wasted any time on it.

                Incidentally I see on your C3P0 plugin that you have managed to bypass all the default transcoding paths for an enabled player, are you rebuilding the command table to do that?
                Yes is exactly what C-3PO does.

                __________________________________________________ ______________________
                Author of C-3PO plugin, Squeezelite-R2, Falcon Web interface - See www.marcoc1712.it

                Comment

                Working...