Commit 7244736d authored by Gildas Bazin's avatar Gildas Bazin

* modules/video_output/directx/directx.c, modules/audio_output/directx.c: removed
unnecessary code.
parent 82b8c862
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* directx.c: Windows DirectX audio output method * directx.c: Windows DirectX audio output method
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: directx.c,v 1.8 2002/11/15 16:27:10 gbazin Exp $ * $Id: directx.c,v 1.9 2002/11/26 22:20:18 gbazin Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -86,9 +86,6 @@ struct aout_sys_t ...@@ -86,9 +86,6 @@ struct aout_sys_t
{ {
LPDIRECTSOUND p_dsobject; /* main Direct Sound object */ LPDIRECTSOUND p_dsobject; /* main Direct Sound object */
LPDIRECTSOUNDBUFFER p_dsbuffer_primary; /* the actual sound card buffer
(not used directly) */
LPDIRECTSOUNDBUFFER p_dsbuffer; /* the sound buffer we use (direct sound LPDIRECTSOUNDBUFFER p_dsbuffer; /* the sound buffer we use (direct sound
* takes care of mixing all the * takes care of mixing all the
* secondary buffers into the primary) */ * secondary buffers into the primary) */
...@@ -136,8 +133,6 @@ vlc_module_end(); ...@@ -136,8 +133,6 @@ vlc_module_end();
static int OpenAudio( vlc_object_t *p_this ) static int OpenAudio( vlc_object_t *p_this )
{ {
aout_instance_t * p_aout = (aout_instance_t *)p_this; aout_instance_t * p_aout = (aout_instance_t *)p_this;
HRESULT dsresult;
DSBUFFERDESC dsbuffer_desc;
int i; int i;
msg_Dbg( p_aout, "Open" ); msg_Dbg( p_aout, "Open" );
...@@ -152,7 +147,6 @@ static int OpenAudio( vlc_object_t *p_this ) ...@@ -152,7 +147,6 @@ static int OpenAudio( vlc_object_t *p_this )
/* Initialize some variables */ /* Initialize some variables */
p_aout->output.p_sys->p_dsobject = NULL; p_aout->output.p_sys->p_dsobject = NULL;
p_aout->output.p_sys->p_dsbuffer_primary = NULL;
p_aout->output.p_sys->p_dsbuffer = NULL; p_aout->output.p_sys->p_dsbuffer = NULL;
p_aout->output.p_sys->p_dsnotify = NULL; p_aout->output.p_sys->p_dsnotify = NULL;
p_aout->output.p_sys->p_notif = NULL; p_aout->output.p_sys->p_notif = NULL;
...@@ -168,21 +162,6 @@ static int OpenAudio( vlc_object_t *p_this ) ...@@ -168,21 +162,6 @@ static int OpenAudio( vlc_object_t *p_this )
goto error; goto error;
} }
/* Obtain (not create) Direct Sound primary buffer */
memset( &dsbuffer_desc, 0, sizeof(DSBUFFERDESC) );
dsbuffer_desc.dwSize = sizeof(DSBUFFERDESC);
dsbuffer_desc.dwFlags = DSBCAPS_PRIMARYBUFFER;
msg_Warn( p_aout, "create direct sound primary buffer" );
dsresult = IDirectSound_CreateSoundBuffer(p_aout->output.p_sys->p_dsobject,
&dsbuffer_desc,
&p_aout->output.p_sys->p_dsbuffer_primary,
NULL);
if( dsresult != DS_OK )
{
msg_Err( p_aout, "cannot create direct sound primary buffer" );
goto error;
}
/* Now we need to setup DirectSound play notification */ /* Now we need to setup DirectSound play notification */
p_aout->output.p_sys->p_notif = p_aout->output.p_sys->p_notif =
vlc_object_create( p_aout, sizeof(notification_thread_t) ); vlc_object_create( p_aout, sizeof(notification_thread_t) );
...@@ -283,10 +262,6 @@ static void CloseAudio( vlc_object_t *p_this ) ...@@ -283,10 +262,6 @@ static void CloseAudio( vlc_object_t *p_this )
/* release the secondary buffer */ /* release the secondary buffer */
DirectxDestroySecondaryBuffer( p_aout ); DirectxDestroySecondaryBuffer( p_aout );
/* then release the primary buffer */
if( p_aout->output.p_sys->p_dsbuffer_primary )
IDirectSoundBuffer_Release( p_aout->output.p_sys->p_dsbuffer_primary );
/* finally release the DirectSound object */ /* finally release the DirectSound object */
if( p_aout->output.p_sys->p_dsobject ) if( p_aout->output.p_sys->p_dsobject )
IDirectSound_Release( p_aout->output.p_sys->p_dsobject ); IDirectSound_Release( p_aout->output.p_sys->p_dsobject );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vout.c: Windows DirectX video output display method * vout.c: Windows DirectX video output display method
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: directx.c,v 1.8 2002/11/26 19:31:50 gbazin Exp $ * $Id: directx.c,v 1.9 2002/11/26 22:20:18 gbazin Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -1415,7 +1415,6 @@ static int DirectXGetSurfaceDesc( vout_thread_t *p_vout, picture_t *p_pic ) ...@@ -1415,7 +1415,6 @@ static int DirectXGetSurfaceDesc( vout_thread_t *p_vout, picture_t *p_pic )
{ {
/* DirectX 3 doesn't support the DDLOCK_NOSYSLOCK flag, resulting /* DirectX 3 doesn't support the DDLOCK_NOSYSLOCK flag, resulting
* in an invalid params error */ * in an invalid params error */
dxresult = IDirectDrawSurface2_Restore( p_pic->p_sys->p_surface );
dxresult = IDirectDrawSurface2_Lock( p_pic->p_sys->p_surface, NULL, dxresult = IDirectDrawSurface2_Lock( p_pic->p_sys->p_surface, NULL,
&p_pic->p_sys->ddsd, &p_pic->p_sys->ddsd,
DDLOCK_WAIT, NULL); DDLOCK_WAIT, 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