Using libsoxr-lsr in Alsa Rate Plugin with LD_PRELOAD

Since my previous post the great libsoxr library incl. the libsoxr-lsr variant has become part of debian testing/ubuntu repositories. It means we can easily use it instead of libsamplerate now.

Just install the package:

pavel@samsung ~ $ aptitude search libsoxr
p libsoxr-dev - High quality 1D sample-rate conversion lib
p libsoxr-dev:i386 - High quality 1D sample-rate conversion lib
p libsoxr-lsr0 - High quality 1D sample-rate conversion lib
p libsoxr-lsr0:i386 - High quality 1D sample-rate conversion lib
p libsoxr0 - High quality 1D sample-rate conversion lib
p libsoxr0:i386 - High quality 1D sample-rate conversion lib

sudo aptitude install libsoxr-lsr0

Check contents of the package:

pavel@samsung ~ $ dpkg -L libsoxr-lsr0
...
/usr/lib/x86_64-linux-gnu/libsoxr-lsr.so.0.1.9
...
/usr/lib/x86_64-linux-gnu/libsoxr-lsr.so.0
...

Using the device rate192 (resampling to 192kHz using samplerate_best) from my previous post, on my samsung laptop:

time aplay -D rate192 sweep.wav
Playing WAVE 'sweep.wav' : Signed 24 bit Little Endian in 3bytes, Frekvence 44100 Hz, Stereo

real 0m10.060s
user 0m7.652s
sys 0m0.044s

Almost 8secs of CPU time for 10 secs playback on Intel i5.

Now let’s use libsoxr-lsr0 instead of libsamplerate, using the handy LD_PRELOAD method:

time LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libsoxr-lsr.so.0 aplay -D rate192 sweep.wav
Playing WAVE 'sweep.wav' : Signed 24 bit Little Endian in 3bytes, Frekvence 44100 Hz, Stereo

real 0m10.037s
user 0m0.652s
sys 0m0.040s

650ms is a way better figure :-)

Unfortunately the spectrum test still reveals the (actually audible) cracks:

As you see the cracks appear only during the first seconds of playback. Hopefully in co-operation with authors of libsoxr this minor issue will be fixed soon.

Note: The noisy background compared to the dark black one of spectrograms shown in my previous post is caused by conversion down to 16 bits, still present in stock alsa library. I will post my patch to alsa-devel mailinglist.

This entry was posted in Linux Audio. Bookmark the permalink.

45 Responses to Using libsoxr-lsr in Alsa Rate Plugin with LD_PRELOAD

  1. I was recommended this web site by my cousin. I’m not sure whether this post is written by him as nobody else know such detailed about my difficulty.
    You’re amazing! Thanks!

  2. We’re a group of volunteers and opening a new scheme in our community.
    Your site provided us with valuable info to work
    on. You have done an impressive job and our whole community will be grateful to you.

    my web blog – drinks (http://opera7.jp/)

  3. Online games have shown considerable improvement in the past decade, and advances in technology have made online games progressively easier to
    use and more impressive than their predecessors. One of the main reasons people choose 2d mmorpgs over their 3d counterparts is because
    of system requirements and capabilities. The Godfather is another game and Dragons of Atlantis is a few of the highly developed strategy
    games found at this site.

    Take a look at my blog – gry strategiczne ranking

  4. Related Site says:

    As all gadgets are made to order by shop house owners,
    there are several methods to add personal message – also for some of the bookish
    objects listed under.

  5. Laurence says:

    Very great post. I simply stumbled upon your blog
    and wished to say that I have really enjoyed browsing your blog posts.
    After all I will be subscribing on your rss feed and I am hoping you write once more very soon!

    Also visit my web-site; hair removal (Laurence)

  6. masterbates says:

    Howdy very nice site!! Man .. Excellent .. Superb ..
    I’ll bookmark your site and take the feeds also? I’m glad to find so many helpful information here within the publish, we’d
    like develop more techniques on this regard, thanks for sharing.

    . . . . .

  7. buty says:

    There are hundreds of brands out there manufacturing the shoes.
    Media doesn’t really know how to handle it and this was never more clear
    when we saw the Vogue Italia cover for June 2011. 1990′s – Bra became a highlight on women’s wardrobe.

  8. Generator will provide you unlimited Gold and Jewels, whenever you needed it.

    Join the satisfied users Crusaders Quest Hack!

  9. Hi just wanted to give you a quick heads up and let you know a few
    of the images aren’t loading correctly. I’m not sure why but I think its a linking issue.

    I’ve tried it in two different internet browsers and both show the same results.

    Feel free to surf to my web-site … appropriate wedding wear

  10. Manufactures its own video game played on a particular game name for the
    complete web developer course download the finish line.

  11. Great delivery. Outstanding arguments. Keep up the great effort.

    My web site – make child modeling

  12. cialis says:

    The brand of Moda in pelle provides extremely stylish, durable and comfortable shoes.
    You should always seek advice from someone who
    has purchase the original boots before. Fresh pairs
    of UGG products arrive in latest designs and fake boots are replicas of these originals.

  13. Aurora says:

    I think the admin of this website is in fact working hard in support of his
    web site, since here every information is quality based data.

    My blog … alcohol; Aurora,

  14. trap music says:

    Right now it appears like Expression Engine is the preferred blogging platform out there right now.
    (from what I’ve read) Is that what you are using on your blog?

    Also visit my webpage … trap music

  15. wiagra says:

    Now, if you are looking for such a brand, you should consider the Bourne shoes.
    Thread and stitching – thread used in stitching is always the same as the colour of the leather.
    Moccasin UGG slippers are quite popular among the men.

  16. Lynda says:

    There is no doubt that you may make your iPhone do silly things, courtesy, Cydia.
    Silas and Paul were in the inner parts of the prison praying and singing.

    Goats can make great pets, particularly for smallholders.

  17. No cost games are available gry online ekonomiczne to fit any interest you have,
    whether you want to play alone or with other people.
    There are so many healthy educational games that can open a window of challenges to young brains while staying clean. The information regarding it is accumulated on a server or servers which are generally hosted by its publisher.

  18. Hello to all, how is everything, I think every one is getting more
    from this site, and your views are nice in support of new visitors.antalya escort

  19. I blog often and I genuinely thank you for your information. The article has truly peaked my interest.

    I am going to take a note of your site and keep checking for new information about once per week.

    I subscribed to your Feed too.

  20. However, fuss of sport news agencies and their quantitative
    approach has emerged a strong urge of qualitative and much professional sports journalism.
    And if you are looking for the best sports news, the Fayetteville Observer has you covered.
    First of all, be passionate about your subject matter.

  21. You can look for BMW repairs Wickford and if at all possible definitely determine
    what you aspire for. His estate was been for a while soon recognized murder.
    Their grossly extended vacation schedule and short hours be damned.

  22. Chauncey says:

    Spot on with this write-up, I honestly feel this web site
    needs a lot more attention. I’ll probably be returning to read
    more, thanks for the advice!

    Also visit my web page – code free wifi gratuit – Chauncey,

  23. Hurrah, that’s what I was searching for, what a stuff!
    existing here at this blog, thanks admin of this site.

  24. I love what you guys are usually up too. This sort of clever work and coverage!
    Keep up the very good works guys I’ve included
    you guys to our blogroll.

    My blog post; kliknij [Http://geremiapools.com/?option=com_k2&view=Itemlist&task=user&id=125930]

  25. xxx says:

    Pretty component of content. I simply stumbled upon your weblog and
    in accession capital to claim that I get in fact enjoyed account your
    weblog posts. Any way I’ll be subscribing to your augment or even I fulfillment you get right of entry to consistently
    fast.

  26. Does your blog have a contact page? I’m having problems locating itt but, I’d like to soot you
    ann email. I’ve got some ideas forr your blog you might be interested in hearing.
    Either way, great site aand I look forwartd to seeeing
    it improve over time.

  27. Excellent beat ! I wish to apprentice at the same time as you
    amend your site, how could i subscribe for a blog website?
    The account aided me a applicable deal. I have been tiny bit familiar of this your broadcast provided vibrant
    transparent idea

  28. Popularly known as Deepam Parthasarathy, after the name of the Tamil magazine
    Why He Disappeared Book Review edited, his novels
    Paandimaa Devi, Rani Mangammal and Manipallavam are very popular.

    This means all the world TV channels and stations are free to upload their free to air programs online.
    Tamil readers could read most of the historical novels serialized in Tamil weekly magazines.

  29. Tamela says:

    I was curious if you ever considered changing the
    structure of your site? Its very well written; I love what youve got to say.
    But maybe you could a little more in the way of content so people could connect with it better.
    Youve got an awful lot of text for only having one or 2 pictures.
    Maybe you could space it out better?

    Here is my web blog: drink recipes (Tamela)

  30. We are the website company that will your business has
    been searching for to do your own website development
    and interpersonal media design.

  31. I do supplement with a little cardio, but generally the weekly
    program is FAR less strenuous than my previous routine.

  32. tadalis says:

    You can adopt their styles to suit yours; this is one of the best ways to determine the right fashion for you.
    The world is really shrinking and ideas are being shared around the globe at
    a rapid pace. Fresh pairs of UGG products arrive in latest designs and fake boots
    are replicas of these originals.

  33. oven toaster says:

    I go to see everyday some web pages and sites to read articles or reviews, except
    this webpage offers quality based posts.

  34. здесь says:

    Learn how to write evaluation literature.
    Подробнее читайте здесь – здесь
    What is evaluation literature?
    Writing the introduction
    Writing our bodies
    Writing concluding
    What is an assessment literature?
    The format of an assessment literature can vary from discipline to discipline and from assignment to assignment.

    A review is often a self-contained unit — a conclusion in itself — or even a
    preface to and rationale for participating in primary research.
    A review is really a required portion of grant and research proposals and
    frequently a chapter in theses and dissertations.

    Generally, the purpose of an review should be to analyze critically a segment of the published body expertise through summary, classification,
    and comparison of prior scientific studies, reviews of literature,
    and theoretical articles.

    Writing the introduction
    In the introduction, you need to:

    Define or identify the final topic, issue, or part of concern, thus
    providing a proper context for reviewing the literature.

    Point out overall trends as to what has been published about the subject; or conflicts in principle, methodology, evidence, and conclusions; or gaps in research and scholarship; or perhaps a single problem
    or new perspective of immediate interest.
    Establish the writer’s reason (mindset) for reviewing
    the literature; explain the factors to be used in analyzing and comparing literature as well as the organization from the review
    (sequence); and, at the appropriate interval, state why certain literature is or possibly not
    included (scope).
    top

    Writing one’s body
    In one’s body, you must:

    Group scientific studies and other varieties of literature (reviews, theoretical articles,
    case studies, etc.) in accordance with common denominators for instance qualitative versus
    quantitative approaches, conclusions of authors, specific
    purpose or objective, chronology, etc.
    Summarize individual studies or articles with just as much or only a
    small amount detail as each merits as outlined by its comparative importance within the literature,
    remembering that space (length) denotes significance.
    Provide the various readers with strong “umbrella” sentences at beginnings of paragraphs,
    “signposts” throughout, and brief “so what” summary sentences at intermediate points
    inside the review to assistance with understanding comparisons and analyses.

    Writing the actual final outcome
    In in conclusion, you need to:

    Summarize major contributions of significant studies and articles towards the body of
    data under review, maintaining the main focus established inside
    introduction.
    Evaluate the present “state from the art” for your body expertise reviewed,
    indicating major methodological flaws or gaps in research,
    inconsistencies in principle and findings, and areas or
    issues pertinent to future study.
    Conclude by offering some understanding of the relationship between central topic from the literature
    review and also a larger part of study like a discipline, a scientific endeavor,
    or perhaps a profession.
    top

    For more info see our handouts on Writing a Critical
    Review of the Nonfiction Book or Article or Reading a Book
    to Review It.

    To find out more on literature reviews, check out our workshop
    on Writing Literature Reviews of Published Research.

  35. I enjoy it. My dress for my June (!) wedding is Hayley Paige, and I’m
    consumed with her + her designs.

  36. Garland says:

    I am truly pleased to glance at this website posts which consists of tons of helpful information,
    thankss for providing such data.

  37. torebki says:

    Many of these new creations are about shape and texture as much as
    color and style. It compares the design of vintage motorcycles to today’s models.

    Right from the beginning the company had earned great reputation thanks to
    the quality of its shoes.

  38. Wilbur says:

    Hi to every body, it’s my first go to see of this blog;
    this webpage includes amazing and really excellent information for readers.

    Check out my weblog – epilator for men 2015 (Wilbur)

  39. erekcja says:

    There are hundreds of brands out there manufacturing the shoes.
    Thread and stitching – thread used in stitching is always
    the same as the colour of the leather. A new kind of wire mixed with natural fabrics, like cotton, provided the perfect adjustment to
    the body.

  40. I am noot sure whеre youu aгe ǥetting yօur info, bսt
    gгeat topic. Ӏ neеds too spend sߋme tіmе lrarning more ߋr understanding mοгe.

    Thanks for excellent infߋrmation I was looking for this informatіon foг my mission.

    ʜere iѕ my webpage – green coffee bean extract chlorogenic acid

  41. This is a topic that is near to my heart… Take care!
    Exactly where are your contact details though?

  42. These collections could serve as memorabilia and are also employed
    to match up with the trend statements they have. When you are looking for cheap fashion clothing &
    accessories, you just need to know where to look.
    The model was first inspired by a highly springy indoor running
    track situated in Harvard.

  43. zajrzyj says:

    Now, if you are looking for such a brand, you should consider the
    Bourne shoes. Bourne’s President, Thomas Mc – Claskie, always uses his creative imagery to make
    trendy shoes for men. Choose not only from the
    styles of the shoes but also make sure that they ate comfortable.

  44. I read this piece of writing fully about the comparison of latest and preceding
    technologies, it’s remarkable article.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

*
captcha

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>