Chris Robinson
f1b0f67553
Build an appropriate channel map for PulseAudio
2013-02-08 18:59:48 -08:00
Chris Robinson
e358882f14
Destroy the ring buffer when closing down a portaudio device
2013-02-01 18:38:44 -08:00
Chris Robinson
9cd086a707
Filter unneeded thread messages with MMDevApi
2012-12-24 05:37:53 -08:00
Chris Robinson
be25e6802d
Add support for OpenSL ES 1.0.1 on Android
2012-12-12 14:36:58 -08:00
Chris Robinson
4621a7b426
Add support for float32 output to CoreAudio
2012-12-03 11:50:02 -08:00
Chris Robinson
4808313e70
Use the correct multiplier for int32 output with CoreAudio
2012-12-03 10:44:02 -08:00
Chris Robinson
1fb9311d82
Lock the device before calling aluHandleDisconnect
...
PulseAudio causes an assert if being relocked inside a callback on the worker
thread, where aluHandleDisconnect is called. We can assume it's already locked
there, so just make sure the device is locked before being calling it.
2012-12-02 11:30:23 -08:00
Chris Robinson
209d09ae13
Avoid locking PulseAudio's mainloop when starting and stopping capture
...
The mainloop is already locked by the caller, and double-locking interferes
with the subsequent wait.
2012-11-19 16:50:03 -08:00
Chris Robinson
3da1b540fd
Use the stored buffer metrics for the mmdevapi buffer size
2012-11-04 22:35:35 -08:00
Chris Robinson
92dde81296
Add rudimentary latency tracking for mmdevapi
...
This won't be as granular as it could be, since it only updates when the wakeup
event trips (which may or may not happen more often than OpenAL's mix updates).
A more correct method would be to query GetCurrentPadding directly, but that
would require sending a message to the processing thread and waiting for a
reply, since we can't guarantee COM on the calling thread.
2012-11-04 08:35:39 -08:00
Chris Robinson
3e71a7cb94
Rename some struct fields for DirectSound
2012-11-04 01:18:39 -08:00
Chris Robinson
b92ad830ef
Avoid recreating the DSound primary buffer
2012-11-04 00:37:31 -07:00
Chris Robinson
84f4afa5f2
Lock the device using the pulseaudio main loop
2012-10-07 02:25:59 -07:00
Chris Robinson
9501f1cb9e
Define WIN32_LEAN_AND_MEAN when including windows.h in alMain.h
2012-10-06 21:36:15 -07:00
Chris Robinson
468759e6ab
Scale and round NumUpdates when PulseAudio changes the sample rate
2012-10-04 23:36:59 -07:00
Chris Robinson
b5d9d8e005
Reset maxlength if PulseAudio updates the playback rate
2012-10-02 17:01:35 -07:00
Chris Robinson
012e61b105
Round when calculating NumUpdates from PulseAudio's minreq
2012-09-25 11:32:49 -07:00
Chris Robinson
52d403b0d1
Make sure PulseAudio sets an update size that's a multiple of 4 samples with SSE
2012-09-20 15:01:49 -07:00
Chris Robinson
0f3a575a09
Don't include alu.h in alMain.h
2012-09-14 02:14:29 -07:00
Chris Robinson
2b5fdad2c8
Free the global ALSA config after opening capture devices too
2012-09-02 14:26:46 -07:00
Lauri Kasanen
a6f9ede849
alsa: Free the global config cache to remove a lot of reported leaks
...
Signed-off-by: Lauri Kasanen <curaga@operamail.com>
2012-09-02 14:16:23 -07:00
Chris Robinson
f2fa5e7c88
Print the error when reporting snd_pcm_delay failure
2012-08-27 22:52:37 -07:00
Chris Robinson
f5e0500df4
Add a macro to help make a 64-bit value
2012-08-19 22:31:55 -07:00
Chris Robinson
37924887e8
Use a default method to provide a dummy latency
2012-08-19 12:31:59 -07:00
Chris Robinson
0db7c4131b
Hold the device lock with PulseAudio between mixing and writing
2012-08-18 17:20:20 -07:00
Chris Robinson
a56a974149
Hold the device lock with ALSA between mixing and writing
2012-08-18 17:18:53 -07:00
Chris Robinson
af7f3768fa
Use non-blocking access for ALSA playback
2012-08-18 17:01:56 -07:00
Chris Robinson
0865db564f
Move the device lock into the backend function table
...
For backend-specific implementations: this should hold the audio mixer loop for
playback devices, and provide recursive mutex behavior.
2012-08-18 15:58:04 -07:00
Chris Robinson
ac4fc4026c
Add a device method to retrieve the active latency
...
This is effectively the time until the next update will be heard by the user,
or the closest approximation thereof, in nanoseconds.
2012-08-17 13:38:52 -07:00
Chris Robinson
147fd9de4e
Avoid dynamic handling of libsndio
...
This makes it safer and easier to handle as OpenBSD updates it
2012-08-16 10:12:50 -07:00
Chris Robinson
f42f655ea9
Don't unlock the pulseaudio mainloop when mixing
...
Lock contention could cause a lengthy delay between mixing and writing the
audio. There shouldn't be any risk of dead-locking as the device lock should
never be held when the mainloop gets locked.
2012-08-12 03:52:38 -07:00
Chris Robinson
8001d86751
Add missing include
2012-06-19 22:15:19 -07:00
Chris Robinson
acca3e5a21
Use a proper method to wait for a PulseAudio operation
2012-06-19 10:37:09 -07:00
Chris Robinson
ac84d95c6e
Silence some GCC warnings
2012-06-17 22:17:03 -07:00
Chris Robinson
785f52aa29
Only try float32 with DSound when specifically requested
...
Some hardware drivers seem to have a bug where a buffer descriptor with a
32-bit float sample type ends up creating a non-float32 buffer.
2012-06-17 04:13:01 -07:00
Chris Robinson
051195a991
Avoid failing if ALSA can't set a buffer or period time near to our request
...
These functions should not fail, but there seem to be bugs that cause them to
sometimes. We're flexible enough to handle almost anything it throws back at us
though, so anything is better than nothing here.
2012-06-16 23:02:59 -07:00
Chris Robinson
90ca6675c2
Allow PulseAudio to spawn a server by default
...
Since only one backend is used at a time now, the issues with device ownership
aren't really prevelant anymore. An application that tries to open all
enumerated devices won't run into the problem of spawning a server and end up
preventing other backend devices from working.
2012-06-16 22:37:45 -07:00
Chris Robinson
0db9730a50
Add an option to allow PulseAudio to move streams
...
This could be made the default, if there's a safe way to update the AL device
specifier.
2012-06-16 22:32:19 -07:00
Chris Robinson
46840ee787
Add DEVPKEY_Device_FriendlyName declaration for mingw-w64 compatibility
2012-06-14 18:10:10 -07:00
Chris Robinson
259e4f5b38
Rename AllDevice -> AllDevices
2012-05-09 16:28:16 -07:00
Chris Robinson
e44229c74e
Clamp the ALSA period time between min and max if setting near fails
2012-05-08 01:23:53 -07:00
Chris Robinson
92827cc467
Clamp the ALSA buffer time between min and max if setting near fails
...
It seems there's some bugs with snd_pcm_hw_params_set_buffer_time_near that
cause it to return "invalid argument" despite a valid nearby buffer time being
available. Clamping the buffer time seems to mitigate the issue a bit.
2012-05-07 11:42:59 -07:00
Chris Robinson
dd3d5bc2d4
Look for libsndio.so.2 instead of libsndio.so
2012-05-05 16:19:51 -07:00
Chris Robinson
648464a2da
Check the right playback device file with OSS
2012-04-22 05:06:44 -07:00
Chris Robinson
511b4790d0
Remove hungarian notation from dsound and mmdevapi
2012-04-19 23:42:02 -07:00
Chris Robinson
cff0f938e5
Remove hungarian notation from the winmm backend
2012-04-19 23:22:11 -07:00
Chris Robinson
5418519637
Remove some more hungarian notation
2012-04-19 23:00:58 -07:00
Chris Robinson
b023dbe7b8
Remove hungarian notation from the device and context structs
2012-04-19 22:50:11 -07:00
Chris Robinson
a08080bd82
Avoid modifying the ALCdevice in portaudio's open method
2012-03-13 22:18:51 -07:00
Chris Robinson
415bf58a06
Store the portaudio stream parameters with the device
2012-03-13 21:52:47 -07:00