Commit d756feeb authored by Jon Lech Johansen's avatar Jon Lech Johansen

* hd1000a: channel reordering

parent 5e9bbe3a
...@@ -66,6 +66,8 @@ static void Close ( vlc_object_t * ); ...@@ -66,6 +66,8 @@ static void Close ( vlc_object_t * );
static void Play ( aout_instance_t * ); static void Play ( aout_instance_t * );
static int Thread ( aout_instance_t * ); static int Thread ( aout_instance_t * );
static void InterleaveS16( int16_t *, int16_t * );
/***************************************************************************** /*****************************************************************************
* Module descriptor * Module descriptor
*****************************************************************************/ *****************************************************************************/
...@@ -235,9 +237,8 @@ static int Thread( aout_instance_t * p_aout ) ...@@ -235,9 +237,8 @@ static int Thread( aout_instance_t * p_aout )
} }
else else
{ {
p_aout->p_vlc->pf_memcpy( p_sys->ppBuffers[ i ], InterleaveS16( (int16_t *)p_buffer->p_buffer,
p_buffer->p_buffer, (int16_t *)p_sys->ppBuffers[ i ] );
p_sys->nBufferSize );
aout_BufferFree( p_buffer ); aout_BufferFree( p_buffer );
} }
...@@ -253,3 +254,15 @@ static int Thread( aout_instance_t * p_aout ) ...@@ -253,3 +254,15 @@ static int Thread( aout_instance_t * p_aout )
return VLC_SUCCESS; return VLC_SUCCESS;
} }
/*****************************************************************************
* InterleaveS16: interleave samples
*****************************************************************************/
static void InterleaveS16( int16_t * p_in, int16_t * p_out )
{
for( int i = 0; i < FRAME_SIZE; i++ )
{
p_out[ i * 2 + 0 ] = p_in[ i * 2 + 1 ];
p_out[ i * 2 + 1 ] = p_in[ i * 2 + 0 ];
}
}
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