Excellent, this did work! Thank you so much! -- Rich -----Original Message----- From: Atte André Jensen Sent: Thursday, November 11, 2010 3:42 AM To: chuck-users@lists.cs.princeton.edu Subject: Re: [chuck-users] Stereo files and SndBuf On 2010-11-11 06:23, Rich Caloggero wrote:
This fails. My sound card is most definately stereo, and the file I'm reading from is definately stereo. What am I doing wrong?
I think SndBuf is always outputting in mono, but can read a stereo sample. Try the following: SndBuf s_left, s_right; "/home/atte/music/samples/seq/beats/bar_matched/dnb1.wav" => s_left.read; "/home/atte/music/samples/seq/beats/bar_matched/dnb1.wav" => s_right.read; 0 => s_left.channel; // not needed 1 => s_right.channel; s_left => dac.left; s_right => dac.right; s_left.length() => now; -- Atte http://atte.dk http://modlys.dk _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users