unsigned int period_time = buffer_time / 4;
int err;
- if (iDisStereo) pchannels = 1;
- else pchannels=2;
+ pchannels=2;
pspeed = 44100;
format = SND_PCM_FORMAT_S16;
unsigned long l;
if (handle == NULL) // failed to open?
- return SOUNDSIZE;
+ return 1;
l = snd_pcm_avail(handle);
if (l < 0) return 0;
if (l < buffer_size / 2) // can we write in at least the half of fragments?
- l = SOUNDSIZE; // -> no? wait
+ l = 1; // -> no? wait
else l = 0; // -> else go on
return l;
if (snd_pcm_state(handle) == SND_PCM_STATE_XRUN)
snd_pcm_prepare(handle);
- snd_pcm_writei(handle,pSound,
- iDisStereo ? lBytes / 2 : lBytes / 4);
+ snd_pcm_writei(handle,pSound, lBytes / 4);
}