<p>George Joseph <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/8173">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Joshua Colp: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved; Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">chan_console: don't read and write at the same time<br><br>It seems that the ALSA backend of PortAudio doesn't know how to both<br>read and write at the same time by adding a per-device mutex.<br><br>FIXME: currently only a draft version. Need to either auto-detect<br>we work with the ALSA backend or add an extra configuration option<br>to use this mutex.<br><br>ASTERISK-27426 #close<br><br>Change-Id: I635eacee45f5413faa18f5a3b606af03b926dacb<br>---<br>M channels/chan_console.c<br>1 file changed, 4 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/channels/chan_console.c b/channels/chan_console.c<br>index 7c57ec4..7692b26 100644<br>--- a/channels/chan_console.c<br>+++ b/channels/chan_console.c<br>@@ -278,7 +278,9 @@<br> <br> for (;;) {<br> pthread_testcancel();<br>+ console_pvt_lock(pvt);<br> res = Pa_ReadStream(pvt->stream, buf, sizeof(buf) / sizeof(int16_t));<br>+ console_pvt_unlock(pvt);<br> pthread_testcancel();<br> <br> if (!pvt->owner) {<br>@@ -611,7 +613,9 @@<br> {<br> struct console_pvt *pvt = ast_channel_tech_pvt(chan);<br> <br>+ console_pvt_lock(pvt);<br> Pa_WriteStream(pvt->stream, f->data.ptr, f->samples);<br>+ console_pvt_unlock(pvt);<br> <br> return 0;<br> }<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/8173">change 8173</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/8173"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 15 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I635eacee45f5413faa18f5a3b606af03b926dacb </div>
<div style="display:none"> Gerrit-Change-Number: 8173 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>