<p dir="ltr">Hi,</p>
<p dir="ltr">I think you should use SndBuf2 instead of SndBuf.</p>
<p dir="ltr">Cheers,<br>
Mario</p>
<p dir="ltr">Sent from my WIKO U PULSE LITE</p>
<div class="quote">On 18 Feb 2019 19:39, &quot;Nunn, Douglas&quot; &lt;Douglas.Nunn@anglia.ac.uk&gt; wrote:<br type='attribution'><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div style="word-wrap:break-word">
<div style="direction:ltr;font-family:&#39;tahoma&#39;;color:#000000;font-size:10pt">
<div>Hi Scott, </div>
<div><br />
</div>
<div>Are you on Windows? Did you specify the -in and -out flags? When I last tested it, the non-ASIO build doesn&#39;t support multi-channel audio. Also, the -dac flag needs an extra character before the number.</div>
<div><span style="font-size:13.3333px"><br />
</span></div>
<div><span style="font-size:13.3333px">If you start the ASIO build of ChucK like this, it works.</span></div>
<div><span style="font-family:&#39;verdana&#39; , &#39;arial&#39; , &#39;sans serif&#39;;font-size:12px;background-color:rgb( 239 , 239 , 239 );color:blue">chuckasio --dac_3 --adc3 --in8 --out8 <a href="http://test.ck">test.ck</a></span><span style="font-family:&#39;verdana&#39; , &#39;arial&#39; , &#39;sans serif&#39;;font-size:12px;background-color:rgb( 239 , 239 , 239 )"> </span></div>
<span style="font-size:13.3333px">
</span><div><span style="font-size:13.3333px"><br />
</span></div>
<div><span style="font-size:13.3333px">Here, 3 is the audio device number. </span>See <a href="http://electro-music.com/forum/topic-69370.html">http://electro-music.com/forum/topic-69370.html</a><a href="http://electro-music.com/forum/topic-69370.html" style="font-size:10pt">http://electro-music.com/forum/topic-69370.html</a></div>

<div><br />
</div>
<div><span style="font-size:10pt">   Hope this helps,</span></div>
<div><br />
</div>
<div>          Doug</div>
<div><br />
</div>
<div><br />
<div style="font-family:&#39;times new roman&#39;;color:#000000;font-size:16px">
<hr />
<div style="direction:ltr"><font face="Tahoma" size="2" color="#000000"><b>From:</b> chuck-users-bounces&#64;lists.cs.princeton.edu [chuck-users-bounces&#64;lists.cs.princeton.edu] on behalf of Scott Smallwood [ssmallwo&#64;ualberta.ca]<br />
<b>Sent:</b> 18 February 2019 17:45<br />
<b>To:</b> ChucK Users Mailing List<br />
<b>Subject:</b> [chuck-users] Routing stereo sound file to dac channels<br />
</font><br />
</div>
<div></div>
<div>
<div>
<div>
<div>Dear chuckians…</div>
<div><br />
</div>
<div>This is bizarre… I was sure I have done this in the past, but it isn’t working and now I’m a bit flummoxed…. Any ideas here?</div>
<div><br />
</div>
<div>PS:  I’m trying to route channels 0 and 1 of a stereo .wav file to dac channels 2 and 3.  Should be simple.  So why doesn’t this work??</div>
<div><br />
</div>
<div>I realize that I could just spit it into mono files… but why?  I thought SndBuf supported up to 8 channels.</div>
<div><br />
</div>
<div>—</div>
<div><br />
</div>
<div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:&#39;monaco&#39;;color:rgb( 180 , 54 , 240 );min-height:17px">
<br />
</div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:&#39;monaco&#39;;color:rgb( 180 , 54 , 240 )">
SndBuf<span style="color:rgb( 0 , 0 , 0 )"> sb;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:&#39;monaco&#39;;min-height:17px">
<br />
</div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:&#39;monaco&#39;;min-height:17px">
<span style="color:rgb( 114 , 158 , 18 )">//read in stereo sound file</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:&#39;monaco&#39;;color:rgb( 81 , 81 , 81 )">
&#34;snd/squeakies/bell_4.wav&#34;<span style="color:rgb( 114 , 158 , 18 )"> </span><span style="color:rgb( 0 , 0 , 0 )">&#61;&gt;</span><span style="color:rgb( 114 , 158 , 18 )"> </span><span style="color:rgb( 0 , 0 , 0 )">sb.read;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:&#39;monaco&#39;;min-height:17px">
<br />
</div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:&#39;monaco&#39;;color:rgb( 114 , 158 , 18 )">
//works - and routes channel 0 of sb to dac.chan(3)</div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:&#39;monaco&#39;">
sb.chan(<span style="color:rgb( 222 , 146 , 16 )">0</span>)<span style="color:rgb( 114 , 158 , 18 )"> </span>&#61;&gt;<span style="color:rgb( 114 , 158 , 18 )"> </span><span style="color:rgb( 4 , 51 , 255 )">dac</span>.chan(<span style="color:rgb( 222 , 146 , 16 )">2</span>);</div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:&#39;monaco&#39;;min-height:17px">
<br />
</div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:&#39;monaco&#39;;color:rgb( 114 , 158 , 18 )">
//doesn&#39;t work - claims NullPointerException</div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:&#39;monaco&#39;">
sb.chan(<span style="color:rgb( 222 , 146 , 16 )">1</span>)<span style="color:rgb( 114 , 158 , 18 )"> </span>&#61;&gt;<span style="color:rgb( 114 , 158 , 18 )"> </span><span style="color:rgb( 4 , 51 , 255 )">dac</span>.chan(<span style="color:rgb( 222 , 146 , 16 )">3</span>);</div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:&#39;monaco&#39;;min-height:17px">
<br />
</div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:&#39;monaco&#39;;color:rgb( 4 , 51 , 255 )">
<span style="color:rgb( 222 , 146 , 16 )">1</span><span style="color:rgb( 0 , 0 , 0 )">::</span>minute<span style="color:rgb( 0 , 0 , 0 )"> &#61;&gt; </span>now<span style="color:rgb( 0 , 0 , 0 )">;</span></div>
</div>
</div>
<br />
<div>
<div style="word-wrap:break-word">
<div style="word-wrap:break-word">
<div style="word-wrap:break-word">
<div style="line-height:normal;word-wrap:break-word">
<div style="line-height:normal;word-wrap:break-word">
<div style="line-height:normal;word-wrap:break-word">
<span style="border-collapse:separate;line-height:normal;border-spacing:0px">
</span><div style="word-wrap:break-word"><span style="border-collapse:separate;line-height:normal;border-spacing:0px">
</span><div style="word-wrap:break-word">—ss</div>
<div style="word-wrap:break-word"><br />
</div>
<div style="word-wrap:break-word">[ - ]  <a href="http://www.scott-smallwood.com">Scott Smallwood</a> - Associate Professor - University of Alberta  [ - ]</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br />
<div>
<div style="color:rgb( 0 , 0 , 0 );letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb( 0 , 0 , 0 );letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb( 0 , 0 , 0 );letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb( 0 , 0 , 0 );font-family:&#39;helvetica&#39;;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb( 0 , 0 , 0 );font-family:&#39;helvetica&#39;;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb( 0 , 0 , 0 );font-family:&#39;helvetica&#39;;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<span style="border-collapse:separate;color:rgb( 0 , 0 , 0 );font-family:&#39;helvetica&#39;;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px">
</span><div style="word-wrap:break-word"><span style="border-collapse:separate;color:rgb( 0 , 0 , 0 );font-family:&#39;helvetica&#39;;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px">
</span><div style="word-wrap:break-word"><br />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p><br />
-- </p>
<p><span style="color:#ff0000"><strong>TAKE CARE:</strong></span><strong> this message originates from an email service
<span style="color:#ff0000">outside of our University</span>. Do not click on any links or open attachments unless you recognise the sender and are absolutely sure that the content is safe</strong></p>
<p> </p>
</div>
</div>
</div>
</div>

<p><span style="font-family:&#39;arial&#39;;font-size:small"><br />-- <br /><a href="http://www.anglia.ac.uk/email-disclaimer">http://www.anglia.ac.uk/email-disclaimer</a><br /></span></p></div>


</blockquote></div>