[pulseaudio-discuss] Question regarding usage of pa_stream_peek() and pa_stream_drop()

nimesh.chanchani at accenture.com nimesh.chanchani at accenture.com
Tue Nov 26 00:13:28 PST 2013


Hi Tanu ,

I recorded with "parecord" and i'm able to get a recording. ( recorded with 44.1 khz , 2 ch and 16 LE ) .

but still no luck with my application. i'm attaching the log file that I got with -vvvvv enabled. can you throw some light?

Regards,
Nimesh

________________________________________
From: Tanu Kaskinen [tanu.kaskinen at linux.intel.com]
Sent: Tuesday, November 19, 2013 1:49 PM
To: Chanchani, Nimesh
Cc: pulseaudio-discuss at lists.freedesktop.org
Subject: Re: [pulseaudio-discuss] Question regarding usage of pa_stream_peek() and pa_stream_drop()

On Tue, 2013-11-19 at 06:05 +0000, nimesh.chanchani at accenture.com wrote:
> Hi Tanu,
>
> I recorded with 8000 hz mono, to reduce the file size. its uploaded.
> http://www.filedropper.com/28_4 ( < 1 MB)

Is the sample format unsigned 8 bit? Do you get better audio quality if you record the audio with parecord instead of your own software?

> ________________________________________
> From: Tanu Kaskinen [tanu.kaskinen at linux.intel.com]
> Sent: Monday, November 18, 2013 12:09 PM
> To: Chanchani, Nimesh
> Cc: pulseaudio-discuss at lists.freedesktop.org
> Subject: Re: [pulseaudio-discuss] Question regarding usage of
> pa_stream_peek() and pa_stream_drop()

> > "void PulseAudioClient::Read()" is the function to lookout for. This
> > is still a test code , so please excuse the inefficiencies.
>
> Read() doesn't lock the mainloop properly. You need to lock it
> whenever you access objects outside the mainloop thread. Read()
> accesses the stream object for the first time in the pa_stream_cork() call.
>
> Nimesh>>Thanks for pointing that out. But there is a strange thing that i notice, after I lock the mainloop before calling pa_stream_cork().
>
> The Flush function , doesn't receive a succede  callback , and I keep waiting in the while loop.
> , if I move the mainloop lock to its original position in the code , i get the flush succede callback.

(You are probably using Outlook as your mail client. Outlook has the option to prefix quoted lines with ">", please turn that option on. It makes it much much easier to read inline comments.)

While you wait in the while loop, I presume you have the mainloop locked? When the mainloop is locked, no code runs in the mainloop thread, so it's no wonder that nothing is happening.

--
Tanu



________________________________

This message is for the designated recipient only and may contain privileged, proprietary, or otherwise confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the e-mail by you is prohibited. Where allowed by local law, electronic communications with Accenture and its affiliates, including e-mail and instant messaging (including content), may be scanned by our systems for the purposes of information security and assessment of internal compliance with Accenture policy. .
______________________________________________________________________________________

www.accenture.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pulse_android.zip
Type: application/x-zip-compressed
Size: 11232 bytes
Desc: pulse_android.zip
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20131126/46846459/attachment.bin>


More information about the pulseaudio-discuss mailing list