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

Feature: Non-interleaved write #139

Open
oomzay opened this issue Jan 19, 2024 · 3 comments
Open

Feature: Non-interleaved write #139

oomzay opened this issue Jan 19, 2024 · 3 comments

Comments

@oomzay
Copy link

oomzay commented Jan 19, 2024

For some applications non-interleaved channel i/o (snd_pcm_writen) is more convenient, and likely more efficient than snd_pcm_writei.

@oomzay oomzay changed the title Feature request: Expose non-interleaved write Feature: Expose non-interleaved write Jan 19, 2024
@oomzay oomzay changed the title Feature: Expose non-interleaved write Feature: Non-interleaved write Jan 19, 2024
@larsimmisch
Copy link
Owner

Just implementing snd_pcm_writen should be fairly simple, but updating the documentation would be a chore for me.

@RonaldAJ
Copy link
Collaborator

@oomzay Can you draft documentation for the function you would like to have?

@oomzay
Copy link
Author

oomzay commented Jan 25, 2024

PCM.write_noninterleaved(data_n)

Writes (plays) the sound in data_n. Data_n must be a list of sample buffers, one buffer per output channel. The length of each buffer must be a multiple of the sample size, and should be exactly the size of a period. Every buffer must hold the same number of samples. If less than ‘period size’ frames are provided, the actual playout will not happen until more data is written.

(Then as for PCM.write())

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

No branches or pull requests

3 participants