Commit abfd55b9 authored by Jaroslav Kysela's avatar Jaroslav Kysela

ALSA CVS update - Takashi Iwai <tiwai@suse.de>

ALSA<-OSS emulation
fixed the calculation of bytes.  this will fix GETxSPACE, GETxPTR,
GETODELAY ioctls.
parent fbbcc35c
......@@ -125,9 +125,10 @@ static long snd_pcm_oss_bytes(snd_pcm_substream_t *substream, long frames)
{
snd_pcm_runtime_t *runtime = substream->runtime;
snd_pcm_uframes_t buffer_size = snd_pcm_lib_buffer_bytes(substream);
frames = frames_to_bytes(runtime, frames);
if (buffer_size == runtime->oss.buffer_bytes)
return frames;
return (runtime->oss.buffer_bytes * frames_to_bytes(runtime, frames)) / buffer_size;
return (runtime->oss.buffer_bytes * frames) / buffer_size;
}
static int snd_pcm_oss_format_from(int format)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment