[RESEND] [PATCH] winepulse: Add pulseaudio driver, v9

Maarten Lankhorst m.b.lankhorst at gmail.com
Wed Mar 7 18:22:58 CST 2012

Signed-off-by: Maarten Lankhorst <m.b.lankhorst at gmail.com>
Resending now v1.4 is released for inclusion into 1.5, no changes from v9

V1: Original version
- Added basic session manager bullshit
- Fixed a bunch of test failures
- Add stubs for audio volumes, fixes to make capture work
- 20% cooler
- reworked clock handling to be much more accurate
- rewrite of all the interesting parts
- only tested rendering, capture untested
- Make mixer settings global to prevent
- Start of making capture working again
- Really break capture this time, TODO!!
- Fix most rendering tests except those related volume, rendering
  should not only pass tests, but also be done in a correct way
- Cleaned up channel mapping
- Fix clock going 2x as fast
- Reliability fixes
- Align buffer size to a multiple of period size
- Remove session lock, I plan to use pulseaudio calls for volume, anyhow
- Implement shared mode capture correctly
- All non-IAudioStreamVolume related tests should pass for capture and
- Add DllMain to fix valgrind complaints
- Add real and fake volume control
- Passes all tests including the ones marked todo_wine
- Rework IAudioClient::Reset, flushing is only needed for render stream.
- Add stream validity checks to IAudioClock as well
- Fix copy pasted bug from winealsa in clone_format (As reported by KittyCat)
- Validate wBitsPerSample for float format (kcat)
- Make the pulse mapping const (kcat)
- Change mix format to float (kcat)
- Fix volume comments referring to alsa instead of Pulseaudio
- Split off pulseaudio spec to waveformat to a separate function
- Disabled audioclock interpolation for now, until I determine how to do it properly.
- Call SetEvent in render callback as last function, since it gives up time slot (as reported by Joerg)
- Reworked capture logic to always capture, since that seems to be the case on windows,
  when stopped we simply drop whole packets, but keep firing the event.
- Rework the logic behind GetMixFormat, and make capture and rendering formats and periods separate again.
  This is needed for example if you have 5.1 playback 44100 with 32kHz 2 channel capture (USB microphone).
- Complete the pa_channel_position -> dwChannelMask mapping
- Use MulDiv instead of pa_bytes_to_usec or pa_usec_to_bytes in a few places.
- Rendering buffers no longer have to be a multiple of period size.

There are 2 places that still have those calls, but in worst case it will make a 50 ns difference
for the reported device periods, while the one in AudioClock::GetPosition is disabled until it's
determined how to handle interpolation of IAudioClock::GetPosition, if that's still going to happen.

I believe with this I addressed all issues and comments raised in V8,
and looking forward to any constructive feedback and test results of V9.
In particular, I'm interested in XAudio2 results with windows version
set to vista or higher, so that it uses mmdevapi directly

winmm and dsound should be able to work unmodified, but you may want
to lower ds_snd_queue_max to 3 or 4 to decrease latency on dsound games.
It seems dsound doesn't respect mmdevapi in that regard or 2 periods
might have been possible. It would have been nice if it did. :(

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20120308/59380af9/attachment-0001.ksh>

More information about the wine-patches mailing list