static const uint32_t pi_channels_src[] =
{ AOUT_CHAN_LEFT, AOUT_CHAN_RIGHT,
AOUT_CHAN_MIDDLELEFT, AOUT_CHAN_MIDDLERIGHT,
- AOUT_CHAN_REARLEFT, AOUT_CHAN_REARRIGHT,
+ AOUT_CHAN_REARLEFT, AOUT_CHAN_REARRIGHT, AOUT_CHAN_REARCENTER,
AOUT_CHAN_CENTER, AOUT_CHAN_LFE, 0 };
static const uint32_t pi_channels_in[] =
{ SPEAKER_FRONT_LEFT, SPEAKER_FRONT_RIGHT,
SPEAKER_SIDE_LEFT, SPEAKER_SIDE_RIGHT,
- SPEAKER_BACK_LEFT, SPEAKER_BACK_RIGHT,
+ SPEAKER_BACK_LEFT, SPEAKER_BACK_RIGHT, SPEAKER_BACK_CENTER,
SPEAKER_FRONT_CENTER, SPEAKER_LOW_FREQUENCY, 0 };
static const uint32_t pi_channels_out[] =
{ SPEAKER_FRONT_LEFT, SPEAKER_FRONT_RIGHT,
SPEAKER_FRONT_CENTER, SPEAKER_LOW_FREQUENCY,
SPEAKER_BACK_LEFT, SPEAKER_BACK_RIGHT,
+ SPEAKER_BACK_CENTER,
SPEAKER_SIDE_LEFT, SPEAKER_SIDE_RIGHT, 0 };
/*****************************************************************************
static int CreateDSBuffer ( aout_instance_t *, int, int, int, int, int, bool );
static int CreateDSBufferPCM ( aout_instance_t *, int*, int, int, int, bool );
static void DestroyDSBuffer ( aout_instance_t * );
-static void DirectSoundThread ( notification_thread_t * );
+static void* DirectSoundThread( vlc_object_t * );
static int FillBuffer ( aout_instance_t *, int, aout_buffer_t * );
/*****************************************************************************
/* Allocate structure */
p_aout->output.p_sys = malloc( sizeof( aout_sys_t ) );
if( p_aout->output.p_sys == NULL )
- {
- msg_Err( p_aout, "out of memory" );
return VLC_ENOMEM;
- }
/* Initialize some variables */
p_aout->output.p_sys->p_dsobject = NULL;
* We use this thread to emulate a callback mechanism. The thread probes for
* event notification and fills up the DS secondary buffer when needed.
*****************************************************************************/
-static void DirectSoundThread( notification_thread_t *p_notif )
+static void* DirectSoundThread( vlc_object_t *p_this )
{
+ notification_thread_t *p_notif = (notification_thread_t*)p_this;
aout_instance_t *p_aout = p_notif->p_aout;
bool b_sleek;
mtime_t last_time;
HRESULT dsresult;
long l_queued = 0;
+ int canc = vlc_savecancel ();
/* We don't want any resampling when using S/PDIF output */
b_sleek = p_aout->output.output.i_format == VLC_FOURCC('s','p','d','i');
/* Wait here until Play() is called */
WaitForSingleObject( p_notif->event, INFINITE );
- if( !p_notif->b_die )
+ if( vlc_object_alive (p_notif) )
{
mwait( p_notif->start_date - AOUT_PTS_TOLERANCE / 2 );
}
last_time = mdate();
- while( !p_notif->b_die )
+ while( vlc_object_alive (p_notif) )
{
long l_read, l_free_slots;
mtime_t mtime = mdate();
/* free the event */
CloseHandle( p_notif->event );
+ vlc_restorecancel (canc);
msg_Dbg( p_notif, "DirectSoundThread exiting" );
+ return NULL;
}