Opened 11 years ago

Closed 11 years ago

#6538 closed enhancement (fixed)

Rewrite win32 directx audio output, add 5.1 and SPDIF support

Reported by: Jeff Lu <jll544@…> Owned by: Nigel
Priority: minor Milestone: unknown
Component: Ports - Windows Version: head
Severity: medium Keywords: win32 directx
Cc: Ticket locked: no

Description

The existing implementation of win32 directx audio (not to be confused with "windows audio") is missing a lot of functionality (soundstretch, upmix, etc.) because it overrides the AudioOutputBase? class at a low level. It is not worthwhile to re-implement these base class features in the directx subclass.

This rewrite implements audio output in the standard way (WriteAudio? called from OutputAudioLoop?), exposing the functionality that was previously hidden. SPDIF passthru, 5.1 PCM support, and volume control are also added as part of this rewrite.

Some sound card drivers, notably Creative Labs, downmix 5.1 PCM streams to stereo when using the "windows audio" interface, so it is worthwhile to have a functioning DirectX audio output class.

Attachments (7)

aodx_trunk.patch (37.2 KB) - added by Jeff Lu <jll544@…> 11 years ago.
aowin_trunk.patch (6.2 KB) - added by Jeff Lu <jll544@…> 11 years ago.
This patch adds SPDIF and 5.1 to audio_win, giving DirectX and Windows similar features (except for Creative Labs drivers as noted above)
aodx_trunk.2.patch (37.3 KB) - added by Jeff Lu <jll544@…> 11 years ago.
Disregard the first patch. This revision adds a check for the rare case that Pause gets called before the device is open.
aodx_21fixes.patch (38.0 KB) - added by Jeff Lu <jll544@…> 11 years ago.
Backport for DirectX audio on 0.21-fixes
aowin_21fixes.patch (6.4 KB) - added by Jeff Lu <jll544@…> 11 years ago.
Backport for windows audio on 0.21-fixes
6538-aodx_trunk.patch (40.2 KB) - added by Jeff Lu <jll544@…> 11 years ago.
Replaces previous aodx patch. Adds additional buffer check to avoid looping audio when CPU is overloaded
packager-additions (1.2 KB) - added by Simon Kenyon <simon@…> 11 years ago.
addtion

Download all attachments as: .zip

Change History (12)

Changed 11 years ago by Jeff Lu <jll544@…>

Attachment: aodx_trunk.patch added

Changed 11 years ago by Jeff Lu <jll544@…>

Attachment: aowin_trunk.patch added

This patch adds SPDIF and 5.1 to audio_win, giving DirectX and Windows similar features (except for Creative Labs drivers as noted above)

Changed 11 years ago by Jeff Lu <jll544@…>

Attachment: aodx_trunk.2.patch added

Disregard the first patch. This revision adds a check for the rare case that Pause gets called before the device is open.

Changed 11 years ago by Jeff Lu <jll544@…>

Attachment: aodx_21fixes.patch added

Backport for DirectX audio on 0.21-fixes

Changed 11 years ago by Jeff Lu <jll544@…>

Attachment: aowin_21fixes.patch added

Backport for windows audio on 0.21-fixes

comment:1 Changed 11 years ago by Jeff Lu <jll544@…>

Added backports for both windows audio and directx audio, so that 0.21-fixes users also can enjoy analog 5.1 and SPDIF on win32.

Changed 11 years ago by Jeff Lu <jll544@…>

Attachment: 6538-aodx_trunk.patch added

Replaces previous aodx patch. Adds additional buffer check to avoid looping audio when CPU is overloaded

comment:2 Changed 11 years ago by Simon Kenyon <simon@…>

i built head with this just now and it works very well. audio and video are in sync. this is 2 channel analog output using DirectX:

hopefully this can be added to the code soon

comment:3 Changed 11 years ago by Simon Kenyon <simon@…>

here is the necessary changes for invoking this change in win32-packager.pl that is in case anyone else want to build it to test

Changed 11 years ago by Simon Kenyon <simon@…>

Attachment: packager-additions added

addtion

comment:4 Changed 11 years ago by markk

(In [21106]) Windows audio improvements and fixes with patch from Jeff Lu. This adds 6 channel and digital output support to the AudioOutputWin? class. Refs #6538.

comment:5 Changed 11 years ago by markk

Resolution: fixed
Status: newclosed

(In [21108]) DirectX audio re-write with patch from Jeff Lu. This provides an implementation consistent with the other audio classes and adds support for digital passthrough, 5.1 pcm etc. At the very least it should fix a significant av sync issue with DirectX audio. Closes #6538.

Note: See TracTickets for help on using tickets.