From ba236ad1084ffc99890f0301f444ddc7d63a64e1 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 3 May 2011 02:29:26 -0700 Subject: Add a frequency-request device flag --- Alc/pulseaudio.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Alc/pulseaudio.c') diff --git a/Alc/pulseaudio.c b/Alc/pulseaudio.c index f3754fed..0520e627 100644 --- a/Alc/pulseaudio.c +++ b/Alc/pulseaudio.c @@ -877,7 +877,7 @@ static ALCboolean pulse_reset_playback(ALCdevice *device) //{{{ ppa_threaded_mainloop_wait(data->loop); ppa_operation_unref(o); } - if(!ConfigValueExists(NULL, "frequency")) + if(!(device->Flags&DEVICE_FREQUENCY_REQUEST)) flags |= PA_STREAM_FIX_RATE; data->frame_size = FrameSizeFromDevFmt(device->FmtChans, device->FmtType); @@ -941,6 +941,10 @@ static ALCboolean pulse_reset_playback(ALCdevice *device) //{{{ { pa_operation *o; + if((device->Flags&DEVICE_FREQUENCY_REQUEST)) + AL_PRINT("Failed to set frequency %dhz, got %dhz instead\n", device->Frequency, data->spec.rate); + device->Flags &= ~DEVICE_FREQUENCY_REQUEST; + /* Server updated our playback rate, so modify the buffer attribs * accordingly. */ data->attr.minreq = (ALuint64)(data->attr.minreq/data->frame_size) * -- cgit v1.2.3