[vlc-commits] waveout: fix volume initialization
Rémi Denis-Courmont
git at videolan.org
Sun May 6 14:38:33 CEST 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun May 6 15:38:12 2012 +0300| [9be0932d795076e8b33cfabb4a2d23042826025d] | committer: Rémi Denis-Courmont
waveout: fix volume initialization
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9be0932d795076e8b33cfabb4a2d23042826025d
---
modules/audio_output/waveout.c | 16 +++++-----------
1 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/modules/audio_output/waveout.c b/modules/audio_output/waveout.c
index 77b448f..f15e656 100644
--- a/modules/audio_output/waveout.c
+++ b/modules/audio_output/waveout.c
@@ -291,20 +291,14 @@ static int Open( vlc_object_t *p_this )
p_aout->format.i_bytes_per_frame;
aout_PacketInit( p_aout, &p_aout->sys->packet, FRAME_SIZE );
- aout_VolumeSoftInit( p_aout );
/* Check for hardware volume support */
if( waveOutGetDevCaps( (UINT_PTR)p_aout->sys->h_waveout,
- &wocaps, sizeof(wocaps) ) == MMSYSERR_NOERROR &&
- wocaps.dwSupport & WAVECAPS_VOLUME )
- {
- DWORD i_dummy;
- if( waveOutGetVolume( p_aout->sys->h_waveout, &i_dummy )
- == MMSYSERR_NOERROR )
- {
- p_aout->pf_volume_set = VolumeSet;
- }
- }
+ &wocaps, sizeof(wocaps) ) == MMSYSERR_NOERROR
+ && (wocaps.dwSupport & WAVECAPS_VOLUME) )
+ aout_VolumeHardInit( p_aout, VolumeSet );
+ else
+ aout_VolumeSoftInit( p_aout );
}
More information about the vlc-commits
mailing list