vlc | branch: master | Andy Tather <[email protected]> | Thu Dec 5 18:33:26 2013 +0100| [4f3bc33fee31bea49fd17306cc5201bb3eb2968a] | committer: Jean-Baptiste Kempf
DirectSound: fix SPDIF Close #9522 > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4f3bc33fee31bea49fd17306cc5201bb3eb2968a --- modules/audio_output/directsound.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/audio_output/directsound.c b/modules/audio_output/directsound.c index c825b35..b29cd7b 100644 --- a/modules/audio_output/directsound.c +++ b/modules/audio_output/directsound.c @@ -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) ) _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
