[alsa-devel] Fw: hardware not asking for more data using asyn call back
Begin forwarded message:
Date: Tue, 29 May 2007 15:19:12 -0400 From: "Ashlesha Shintre" ashlesha.shintre@gmail.com To: stanl@cox.net, alsa-devel@alsa-project.org Subject: Re: hardware not asking for more data using asyn call back
Hi,
Thanks Stan, for your response - Instead of copying pcm data from a wav file, i decided to copy all the data to a master buffer first and then see if the circular buffer implementation works -
so now instead of copying from the wave file, i m copying data from the master buffer to the circular buffer.. however, as per your suggestion, if i copy the data in the while loop in main, then, it might not always be copied between 2 consecutive callbacks, but maybe more, as the callbacks are asynchronous.
however, the hardware still does not ask for more data after executing the callback function about twice -- is there a way to flush the hardware buffer before beginning playback? I have pasted my code below
Regards, Ashlesha.
<snip>
I've been doing some thinking about what you are trying to accomplish and have a suggestion. I think you would be better off letting jack handle the back end/sound portion. Run a daemon/service listening on an arbitrary tcp/ip port. On startup it initializes alsa and jack. When it receives a request, it forks a process which opens a new channel on jack and creates a buffer for it. It then plays the sound it receives on that link via jack, silence when the buffer is empty. You would have to write client software for the user on the network to contact your daemon/service.
You might even find something like this already out there.
participants (1)
-
stan