Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intial support for 24 bits sample format (24bit stored on 4 bytes) #918

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

abique
Copy link
Contributor

@abique abique commented Sep 24, 2024

There are two common ways of storing 24 bits samples:

  • on 4 bytes (called 24, most common)
  • on 3 bytes (called 24_3)

With the current code, 3 bytes seems difficult to implement and would require a larger code refactoring.

That being said, having at least '24' helps to work with hardware that only offer it.

Depends on #915 for successful compilation.
Replaces #914

There are two common ways of storing 24 bits samples:
- on 4 bytes (called 24, most common)
- on 3 bytes (called 24_3)

With the current code, 3 bytes seems difficult to implement and would require
a larger code refactoring.

That being said, having at least '24' helps to work with hardware that only offer it.
@est31
Copy link
Member

est31 commented Feb 16, 2025

Hi, I've since merged #927, which adds support for 24 bit asio samples. Are you interested in adding support for other backends?

@abique
Copy link
Contributor Author

abique commented Feb 17, 2025

Hi @est31 ,

Good that you've made progress on the 24 bit samples, it did prevent some hardware (that only worked with 24 bits samples) to function.

Though, I don't plan to do any further changes to cpal given that #917 didn't get any feedback so far.

Cheers,
Alex

@abique
Copy link
Contributor Author

abique commented Feb 17, 2025

I'd suggest to have float in/out and keep the complexity of sample encoding as an internal thing.
You won't be able to work with more complicated encoding this way:

  • bit-stream
  • 24 bits encoded on 3 or 4 bytes
  • big/little endian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants