diff options
author | Chris Robinson <[email protected]> | 2009-09-16 22:58:54 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2009-09-16 22:58:54 -0700 |
commit | cbcaa54173bf6b14435adf3daf9feb2fa2e37d04 (patch) | |
tree | a56832a1ee9f96e72ac03a0424893714794cae4a /Alc/pulseaudio.c | |
parent | 94e3fca7022c5c7f8147200ffdb3cda5ded62488 (diff) |
Store the number of periods in the device instead of the buffer size
Also keep all the fields in sync
Diffstat (limited to 'Alc/pulseaudio.c')
-rw-r--r-- | Alc/pulseaudio.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Alc/pulseaudio.c b/Alc/pulseaudio.c index c5453344..53e864b2 100644 --- a/Alc/pulseaudio.c +++ b/Alc/pulseaudio.c @@ -342,17 +342,13 @@ static ALCboolean pulse_reset_playback(ALCdevice *device) //{{{ ppa_threaded_mainloop_lock(data->loop); - data->samples = device->BufferSize; data->frame_size = aluBytesFromFormat(device->Format) * aluChannelsFromFormat(device->Format); - - device->UpdateSize = device->BufferSize / 4; - data->attr.minreq = -1; data->attr.prebuf = -1; data->attr.maxlength = -1; data->attr.fragsize = data->frame_size * device->UpdateSize; - data->attr.tlength = data->attr.fragsize * 4; + data->attr.tlength = data->attr.fragsize * device->NumUpdates; data->stream_name = "Playback Stream"; data->spec.rate = device->Frequency; @@ -464,7 +460,7 @@ static ALCboolean pulse_open_capture(ALCdevice *device, const ALCchar *device_na data = device->ExtraData; ppa_threaded_mainloop_lock(data->loop); - data->samples = device->BufferSize; + data->samples = device->UpdateSize * device->NumUpdates; data->frame_size = aluBytesFromFormat(device->Format) * aluChannelsFromFormat(device->Format); |