aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-09-21 02:31:33 -0700
committerChris Robinson <[email protected]>2009-09-21 02:31:33 -0700
commit0ae02e8ad4f77287e4641ab9491c94efac2d402b (patch)
tree600a9237ac17b038d354fdf383095cc2f846270f /Alc
parent2cbdffab86127635a865b063572db6a9a9f09b99 (diff)
Support floating point capture for backends that can handle it
Diffstat (limited to 'Alc')
-rw-r--r--Alc/alsa.c3
-rw-r--r--Alc/pulseaudio.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/Alc/alsa.c b/Alc/alsa.c
index 53177c13..8a28ce0f 100644
--- a/Alc/alsa.c
+++ b/Alc/alsa.c
@@ -620,6 +620,9 @@ open_alsa:
case 2:
data->format = SND_PCM_FORMAT_S16;
break;
+ case 4:
+ data->format = SND_PCM_FORMAT_FLOAT;
+ break;
default:
data->format = SND_PCM_FORMAT_UNKNOWN;
AL_PRINT("Unknown format?! %x\n", pDevice->Format);
diff --git a/Alc/pulseaudio.c b/Alc/pulseaudio.c
index 53e864b2..b5add4c8 100644
--- a/Alc/pulseaudio.c
+++ b/Alc/pulseaudio.c
@@ -491,6 +491,9 @@ static ALCboolean pulse_open_capture(ALCdevice *device, const ALCchar *device_na
case 2:
data->spec.format = PA_SAMPLE_S16NE;
break;
+ case 4:
+ data->spec.format = PA_SAMPLE_FLOAT32NE;
+ break;
default:
AL_PRINT("Unknown format: %x\n", device->Format);
ppa_threaded_mainloop_unlock(data->loop);