summaryrefslogtreecommitdiffstats
path: root/Alc/pulseaudio.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-05-03 02:29:26 -0700
committerChris Robinson <[email protected]>2011-05-03 02:29:26 -0700
commitba236ad1084ffc99890f0301f444ddc7d63a64e1 (patch)
tree57c2cb594091d19ff86485d2a9039e69ad595778 /Alc/pulseaudio.c
parent9a28402b90c596ccdc7d1a4ee93f5711637bb484 (diff)
Add a frequency-request device flag
Diffstat (limited to 'Alc/pulseaudio.c')
-rw-r--r--Alc/pulseaudio.c6
1 files changed, 5 insertions, 1 deletions
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) *