There is a sound library written by _why called bloops. It runs fine, but within several minutes, it crashes. Following is a sample code:
#!/usr/bin/env ruby
require 'bloops'
loop {
b = Bloops.new
b.tempo = 320
b.tune(b.sound(Bloops::SAWTOOTH), "c")
b.play
sleep 1 until b.stopped?
b.clear
}
The error message is like this:
Expression 'r' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1344 Expression 'PaAlsaStreamComponent_FinishConfigure( &self->playback, hwParamsPlayback, outParams, self->primeBuffers, realSr, outputLatency )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1889 Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1994
Is there any solution to avoid this crash? I use ruby1.9.2 on Ubuntu linux 10.04