Skip to content

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

@roderickvd
Copy link
Member

Superseded by #1011 based on this work. Thanks!

@roderickvd roderickvd closed this Sep 26, 2025
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.

3 participants