Commit 4f3bc33f authored by Andy Tather's avatar Andy Tather Committed by Jean-Baptiste Kempf

DirectSound: fix SPDIF

Close #9522
parent 4fcfd847
......@@ -184,7 +184,7 @@ static int Start( audio_output_t *p_aout, audio_sample_format_t *restrict fmt )
if ( AOUT_FMT_SPDIF( fmt ) && var_InheritBool( p_aout, "spdif" )
&& CreateDSBuffer( p_aout, VLC_CODEC_SPDIFL, fmt->i_physical_channels,
aout_FormatNbChannels( fmt ), fmt->i_rate, true )
aout_FormatNbChannels( fmt ), fmt->i_rate, false )
== VLC_SUCCESS )
{
msg_Dbg( p_aout, "using A/52 pass-through over S/PDIF" );
......@@ -580,6 +580,10 @@ static int CreateDSBuffer( audio_output_t *p_aout, int i_format,
dsbdesc.dwBufferBytes = DS_BUF_SIZE; /* buffer size */
dsbdesc.lpwfxFormat = (WAVEFORMATEX *)&waveformat;
/* CreateSoundBuffer doesn't allow volume control for non-PCM buffers */
if ( i_format == VLC_CODEC_SPDIFL )
dsbdesc.dwFlags &= ~DSBCAPS_CTRLVOLUME;
if FAILED( IDirectSound_CreateSoundBuffer(
p_aout->sys->p_dsobject, &dsbdesc,
&p_aout->sys->p_dsbuffer, NULL) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment