<div dir="ltr">On Tue, Aug 13, 2013 at 9:51 AM, Ryan Conrad <span dir="ltr"><<a href="mailto:rconrad54@gmail.com" target="_blank">rconrad54@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">I am not sure if this is a bug or not, but in chan_console, the function console_write returns frames with 320 samples instead of 160 eventhough the channels writeformat, readformat, rawwriteformat, and rawreadformat are all set to SLINEAR and not SLINEAR16.<br>
</div></blockquote><div><br></div><div>console_write doesn't return frames, but I'm assuming you're just talking about the audio frames that get queued up to be read from the channel.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">Please help, what else should I set to have console_write be correct? Or is this truly a bug?</div></blockquote><div><br></div><div>I don't know what all you've changed to try to make it do what you want, but it's more than just setting those fields on the ast_channel.</div>
<div><br></div><div>You would need to change this so that portaudio gets set up correctly:</div><div><br></div><div><a href="https://github.com/russellb/asterisk/blob/685ab908534cd2f6f7e25b117974a82fe1a5229a/channels/chan_console.c#L86">https://github.com/russellb/asterisk/blob/685ab908534cd2f6f7e25b117974a82fe1a5229a/channels/chan_console.c#L86</a> </div>
<div><br></div><div>Also look for everywhere you see AST_FORMAT_SLINEAR16. The function reading audio from portaudio and queueing it up on the channel is:</div><div><br></div><div><a href="https://github.com/russellb/asterisk/blob/685ab908534cd2f6f7e25b117974a82fe1a5229a/channels/chan_console.c#L277">https://github.com/russellb/asterisk/blob/685ab908534cd2f6f7e25b117974a82fe1a5229a/channels/chan_console.c#L277</a><br>
</div></div></div></div>