aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/portaudio.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-02-24 18:51:57 -0800
committerChris Robinson <[email protected]>2010-02-24 18:51:57 -0800
commita9e0e57797c6f4321d5776e1f29bf1e75b11e6a1 (patch)
tree71353f0190332bd69806103e039c2a4293c90a23 /Alc/portaudio.c
parent9b47048231169ec1cdcea1f20638f6426d796e92 (diff)
Keep UpdateSize updated when apps request a frequency
Diffstat (limited to 'Alc/portaudio.c')
-rw-r--r--Alc/portaudio.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Alc/portaudio.c b/Alc/portaudio.c
index 5d403f29..1a6142ed 100644
--- a/Alc/portaudio.c
+++ b/Alc/portaudio.c
@@ -126,6 +126,7 @@ void pa_unload(void)
typedef struct {
PaStream *stream;
+ ALuint update_size;
} pa_data;
@@ -160,6 +161,8 @@ static ALCboolean pa_open_playback(ALCdevice *device, const ALCchar *deviceName)
return ALC_FALSE;
data = (pa_data*)calloc(1, sizeof(pa_data));
+ data->update_size = device->UpdateSize;
+
device->ExtraData = data;
outParams.device = GetConfigValueInt("port", "device", -1);
@@ -232,6 +235,7 @@ static ALCboolean pa_reset_playback(ALCdevice *device)
streamInfo = pPa_GetStreamInfo(data->stream);
device->Frequency = streamInfo->sampleRate;
+ device->UpdateSize = data->update_size;
err = pPa_StartStream(data->stream);
if(err != paNoError)