* [alsa-devel] Code Example for Playing Sound in the Background
[not found] <1576347545656913996-webhooks-bot@alsa-project.org>
@ 2019-12-14 18:19 ` GitHub issues - edited
0 siblings, 0 replies; 3+ messages in thread
From: GitHub issues - edited @ 2019-12-14 18:19 UTC (permalink / raw)
To: alsa-devel
alsa-project/alsa-lib issue #17 was edited from leimao:
Hello,
I wrote a simple C++ player based on alsa-lib which allows me to play `wav` files. I wonder if there is any convenient way to modify my code so that I can play the the `wav` file in the background and the main program is executing something else, say, a `while` loop.
Edited and Updated:
I tried to use `std::thread` and `std::async`, I was able to play the sound in the background. I looked at the header file of alsa-lib, it seems that alsa-lib natively supports playing sound asynchronously. I wonder how I could do it easily.
Thank you very much.
Best,
Lei
Issue URL : https://github.com/alsa-project/alsa-lib/issues/17
Repository URL: https://github.com/alsa-project/alsa-lib
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* [alsa-devel] Code Example for Playing Sound in the Background
[not found] <1576347554941273928-webhooks-bot@alsa-project.org>
@ 2019-12-14 18:19 ` GitHub issues - edited
0 siblings, 0 replies; 3+ messages in thread
From: GitHub issues - edited @ 2019-12-14 18:19 UTC (permalink / raw)
To: alsa-devel
alsa-project/alsa-lib issue #17 was edited from leimao:
Hello,
I wrote a simple C++ player based on alsa-lib which allows me to play `wav` files. I wonder if there is any convenient way to modify my code so that I can play the the `wav` file in the background and the main program is executing something else, say, a `while` loop.
_Edited and Updated:_
I tried to use `std::thread` and `std::async`, I was able to play the sound in the background. I looked at the header file of alsa-lib, it seems that alsa-lib natively supports playing sound asynchronously. I wonder how I could do it easily.
Thank you very much.
Best,
Lei
Issue URL : https://github.com/alsa-project/alsa-lib/issues/17
Repository URL: https://github.com/alsa-project/alsa-lib
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* [alsa-devel] Code Example for Playing Sound in the Background
[not found] <1576346389096812010-webhooks-bot@alsa-project.org>
@ 2019-12-14 17:59 ` GitHub issues - opened
0 siblings, 0 replies; 3+ messages in thread
From: GitHub issues - opened @ 2019-12-14 17:59 UTC (permalink / raw)
To: alsa-devel
alsa-project/alsa-lib issue #17 was opened from leimao:
Hello,
I wrote a simple C++ player based on alsa-lib which allows me to play `wav` files. I wonder if there is any convenient way to modify my code so that I can play the the `wav` file in the background and the main program is executing something else, say, a `while` loop. I tried to use `std::thread` but I did not succeed.
Thank you very much.
Best,
Lei
Issue URL : https://github.com/alsa-project/alsa-lib/issues/17
Repository URL: https://github.com/alsa-project/alsa-lib
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-12-14 18:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1576347545656913996-webhooks-bot@alsa-project.org>
2019-12-14 18:19 ` [alsa-devel] Code Example for Playing Sound in the Background GitHub issues - edited
[not found] <1576347554941273928-webhooks-bot@alsa-project.org>
2019-12-14 18:19 ` GitHub issues - edited
[not found] <1576346389096812010-webhooks-bot@alsa-project.org>
2019-12-14 17:59 ` GitHub issues - opened
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).