Code Monkey home page Code Monkey logo

Comments (3)

davidgfnet avatar davidgfnet commented on June 11, 2024

Ha! Nevermind, managed to find it myself:
Just replaced bluetooth with bluealsa and then for the sake of convenience btheadset to default (!default actually).
Now my whole system spits out sound to my soundbar. Only issue though is the buffering being quite big. On my senheiser speakers they will play at a higher sample rate (barely noticeable, like 5-10% oversampling) so that way they ca reduce the samples in the buffer and make sure the latency is low.
Any ideas on that?

from bluez-alsa.

arkq avatar arkq commented on June 11, 2024

To be honest I have no idea what might cause oversampling. The first thing which comes to my mind is sampling frequency incompatibility. However, I can see, that in your configuration you are using plug plugin, which should autocorrect this issue.

It is possible to detect whether this issue is caused by bluealsa, though. You have to save raw audio from ALSA PCM plugin (before it is sent to the bluealsa) and/or from the bluealsa IO thread function (assuming that SBC was selected as an audio codec, otherwise here).

After these lines, add something like:

write(f, head, len /* or "samples * 2" */); // one sample is 16 bit

and before while or for loop add:
int f = open("/tmp/xxx.raw", O_WRONLY|O_CREAT, 0644);

This should save all incoming PCM data. Afterward, you can play these files (providing correct sampling and number of channels).

If oversampling occurs in both cases, then it is a proof, that something is wrong with plug plugin. Oversampling in the data saved from the "bluealsa" server - definitely an issue with bluealsa :)

from bluez-alsa.

davidgfnet avatar davidgfnet commented on June 11, 2024

from bluez-alsa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.