[PATCH 4/4] dsound: support 5.1 sound
Chris Robinson
chris.kcat at gmail.com
Tue Jan 6 20:50:18 CST 2015
On 01/06/2015 11:27 AM, Mark Harmstone wrote:
> + case DSSPEAKER_5POINT1_BACK:
> + device->speaker_angles[0] = M_PI/180.0f * -135.0f;
> + device->speaker_angles[1] = M_PI/180.0f * -45.0f;
> + device->speaker_angles[2] = M_PI/180.0f * 0.0f;
> + device->speaker_angles[3] = M_PI/180.0f * 45.0f;
> + device->speaker_angles[4] = M_PI/180.0f * 135.0f;
> + device->speaker_angles[5] = 9999.0f;
> + device->speaker_num[0] = 4; /* Rear left */
> + device->speaker_num[1] = 0; /* Front left */
> + device->speaker_num[2] = 2; /* Front centre */
> + device->speaker_num[3] = 1; /* Front right */
> + device->speaker_num[4] = 5; /* Rear right */
> + device->speaker_num[5] = 3; /* LFE */
> + device->num_speakers = 6;
> + device->lfe_channel = 3;
> + break;
This doesn't look right. According to
<http://www.dolby.com/us/en/guide/surround-sound-speaker-setup/5-1-setup.html>,
5.1 should have the front-right/right speakers between +/-30 degrees max
and +/-22 degrees min, and the back (surround) speakers between +/-110
degrees max, +/-90 degrees min.
> + case DSSPEAKER_5POINT1_SURROUND:
> + device->speaker_angles[0] = M_PI/180.0f * -90.0f;
> + device->speaker_angles[1] = M_PI/180.0f * -30.0f;
> + device->speaker_angles[2] = M_PI/180.0f * 0.0f;
> + device->speaker_angles[3] = M_PI/180.0f * 30.0f;
> + device->speaker_angles[4] = M_PI/180.0f * 90.0f;
> + device->speaker_angles[5] = 9999.0f;
> + device->speaker_num[0] = 4; /* Rear left */
> + device->speaker_num[1] = 0; /* Front left */
> + device->speaker_num[2] = 2; /* Front centre */
> + device->speaker_num[3] = 1; /* Front right */
> + device->speaker_num[4] = 5; /* Rear right */
> + device->speaker_num[5] = 3; /* LFE */
> + device->num_speakers = 6;
> + device->lfe_channel = 3;
> + break;
This looks like it's based on OpenAL Soft (which is fine), which
originally had 5.1side using 90 degrees. However I'm not sure it's
really necessary for the two modes to use different angles. The current
Git version of OpenAL Soft was changed so both 5.1 modes use 110 degree
angles for the rear/side speakers, and the only difference is which
output speakers they're mapped to.
It's not exactly wrong to put 5POINT1_BACK at 110 degrees and
5POINT1_SURROUND at 90 (they're both within spec), but I think the
intended difference is only for physical speaker mapping rather than
positioning.
More information about the wine-devel
mailing list