sndio play multiple wav files ?
Paul Wisehart <[email protected]>
| Newsgroups | gmane.os.openbsd.misc |
|---|---|
| Message-ID | <[email protected]> |
Hi!, I am working on a curses C sndio app to play samples that are just wav files. I would like to be able to play them "over each other" like not sequentially. (I would like for the wav file to play regardless if another one is already playing.) I can play ONE wav file using sndio. https://codeberg.org/pkw/siotest/src/branch/main/siotest.c#L130 What is the easiest and most idiomatic way to play multiples ones ? My naive approach is to just do the same thing as I would do for one and put that into a pthread. That means I am opening the sndio device each time. (sio_open) I see in game programming people do "mixing" of sound. Any pointers or places to look? I want to use just OpenBSD and sndio if possible. I am using libsndfile, but that is just to open the wav files easily. thanks! -- Paul W