if default were 1.0, it would automatically start to play the moment that .read finishes, which isn't always what we want. --now-- sndbuf buf => dac; "snare.wav" => buf.read; 1.0 => buf.rate; while( true ) { 0 => buf.pos; 100::ms => now; } ----- what we need is .play, and .stop which set/unset a flag, independent of playback speed. i'll add those tonight, and then a default of 1.0 is proper. --soon-- sndbuf buf => dac; "snare.wav" => buf.read; 500::ms => now; buf.play; while( true ) { 100::ms => now; 0 => buf.pos; } Phil On Thursday, September 2, 2004, at 08:06 PM, Perry R Cook wrote:
Shouldn't the default be a rate of 1.0??
PRC
On Thu, 2 Sep 2004, Philip Davidson wrote:
there's a bug in that example.
sndbuf needs to have a non-zero rate specified before it starts to play.
1.0 => buf.rate; will do the trick
.rate controls the playback speed, relative to the 'proper' speed of the file and it's set to 0 by default
the example has been updated in cvs.
that bug aside, i've noticed some issues with sndfile that i'm hoping to track down, so let me know if you find more errors
thank you!
*Phil
_______________________________________________ chuck mailing list chuck@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck
_______________________________________________ chuck mailing list chuck@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck