Commit d33deda2 authored by Cyril Deguet's avatar Cyril Deguet

HUGE cleanings in audio output:
- removed AOUT_INTF_*_FIFO, which where not used
- factorized S16StereoPlay, U8MonoPlay, and so on.., in a single
  function aout_FillBuffer (in aout_common.c)
  (unsigned 8bit may be broken, but I have no stream to test with :(

- last step to be done: factorize aout_s8, aout_s16, ... thanks to a macro
parent f84729fc
...@@ -126,7 +126,7 @@ PLUGINS_TARGETS := ac3_adec/ac3_adec \ ...@@ -126,7 +126,7 @@ PLUGINS_TARGETS := ac3_adec/ac3_adec \
INTERFACE := main interface intf_msg intf_playlist intf_eject INTERFACE := main interface intf_msg intf_playlist intf_eject
INPUT := input input_ext-dec input_ext-intf input_dec input_programs input_clock mpeg_system INPUT := input input_ext-dec input_ext-intf input_dec input_programs input_clock mpeg_system
VIDEO_OUTPUT := video_output video_text vout_pictures vout_subpictures VIDEO_OUTPUT := video_output video_text vout_pictures vout_subpictures
AUDIO_OUTPUT := audio_output aout_ext-dec aout_u8 aout_s8 aout_u16 aout_s16 aout_spdif AUDIO_OUTPUT := audio_output aout_common aout_ext-dec aout_u8 aout_s8 aout_u16 aout_s16 aout_spdif
MISC := mtime modules netutils iso_lang MISC := mtime modules netutils iso_lang
C_OBJ := $(INTERFACE:%=src/interface/%.o) \ C_OBJ := $(INTERFACE:%=src/interface/%.o) \
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* audio_output.h : audio output thread interface * audio_output.h : audio output thread interface
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: audio_output.h,v 1.40 2002/01/09 00:33:37 asmax Exp $ * $Id: audio_output.h,v 1.41 2002/01/14 12:15:10 asmax Exp $
* *
* Authors: Michel Kaempf <maxx@via.ecp.fr> * Authors: Michel Kaempf <maxx@via.ecp.fr>
* Cyril Deguet <asmax@via.ecp.fr> * Cyril Deguet <asmax@via.ecp.fr>
...@@ -120,11 +120,9 @@ typedef struct aout_fifo_s ...@@ -120,11 +120,9 @@ typedef struct aout_fifo_s
( ((((fifo).l_end_frame + 1) - (fifo).l_start_frame) & AOUT_FIFO_SIZE) == 0 ) ( ((((fifo).l_end_frame + 1) - (fifo).l_start_frame) & AOUT_FIFO_SIZE) == 0 )
#define AOUT_EMPTY_FIFO 0 #define AOUT_EMPTY_FIFO 0
#define AOUT_INTF_MONO_FIFO 1 #define AOUT_ADEC_MONO_FIFO 1
#define AOUT_INTF_STEREO_FIFO 2 #define AOUT_ADEC_STEREO_FIFO 2
#define AOUT_ADEC_MONO_FIFO 3 #define AOUT_ADEC_SPDIF_FIFO 3
#define AOUT_ADEC_STEREO_FIFO 4
#define AOUT_ADEC_SPDIF_FIFO 5
/***************************************************************************** /*****************************************************************************
* aout_thread_t : audio output thread descriptor * aout_thread_t : audio output thread descriptor
......
/*****************************************************************************
* aout_common.c: generic audio output functions
*****************************************************************************
* Copyright (C) 1999-2002 VideoLAN
* $Id
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Cyril Deguet <asmax@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#include <stdio.h> /* "intf_msg.h" */
#include <stdlib.h> /* calloc(), malloc(), free() */
#include <string.h>
#include <videolan/vlc.h>
#include "audio_output.h"
#include "aout_common.h"
/*****************************************************************************
* Functions
*****************************************************************************/
/* Read data from decoder fifo, and put it in S32_buffer */
void aout_FillBuffer( aout_thread_t * p_aout, aout_fifo_t * p_fifo )
{
long l_buffer = 0;
long l_buffer_limit, l_units;
switch ( p_fifo->i_type )
{
case AOUT_EMPTY_FIFO:
break;
case AOUT_ADEC_MONO_FIFO:
case AOUT_ADEC_STEREO_FIFO:
l_units = p_aout->l_units;
while ( l_units > 0 )
{
if( !p_fifo->b_next_frame )
{
if( NextFrame(p_aout, p_fifo, p_aout->date +
((((mtime_t)(l_buffer >> 1)) * 1000000) /
((mtime_t)p_aout->l_rate))) )
{
break;
}
}
l_buffer_limit = p_aout->l_units << p_aout->b_stereo;
while ( l_buffer < l_buffer_limit )
{
if( p_aout->b_stereo )
{
p_aout->s32_buffer[l_buffer++] +=
(s32)( ((s16 *)p_fifo->buffer)[2*p_fifo->l_unit] );
p_aout->s32_buffer[l_buffer++] +=
(s32)( ((s16 *)p_fifo->buffer)[2*p_fifo->l_unit+1] );
}
else
{
p_aout->s32_buffer[l_buffer++] +=
(s32)( ((s16 *)p_fifo->buffer)[p_fifo->l_unit] );
}
UPDATE_INCREMENT( p_fifo->unit_increment, p_fifo->l_unit )
if( p_fifo->l_unit >= ((AOUT_FIFO_SIZE + 1) *
(p_fifo->l_frame_size >> p_fifo->b_stereo)) )
{
p_fifo->l_unit -= ((AOUT_FIFO_SIZE + 1) *
(p_fifo->l_frame_size >> p_fifo->b_stereo));
}
}
if ( p_fifo->l_units > l_units )
{
p_fifo->l_units -= l_units;
break;
}
else /* p_fifo->l_units <= l_units */
{
l_units -= p_fifo->l_units;
vlc_mutex_lock( &p_fifo->data_lock );
p_fifo->l_start_frame = p_fifo->l_next_frame;
vlc_cond_signal( &p_fifo->data_wait );
vlc_mutex_unlock( &p_fifo->data_lock );
/* p_fifo->b_start_frame = 1; */
p_fifo->l_next_frame += 1;
p_fifo->l_next_frame &= AOUT_FIFO_SIZE;
p_fifo->b_next_frame = 0;
}
}
break;
default:
intf_DbgMsg("aout debug: unknown fifo type (%i)", p_fifo->i_type);
break;
}
}
...@@ -2,9 +2,10 @@ ...@@ -2,9 +2,10 @@
* aout_common.h: audio output inner functions * aout_common.h: audio output inner functions
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN * Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: aout_common.h,v 1.6 2001/11/07 22:58:13 jlj Exp $ * $Id: aout_common.h,v 1.7 2002/01/14 12:15:10 asmax Exp $
* *
* Authors: Michel Kaempf <maxx@via.ecp.fr> * Authors: Michel Kaempf <maxx@via.ecp.fr>
* Cyril Deguet <asmax@via.ecp.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -30,15 +31,13 @@ ...@@ -30,15 +31,13 @@
/* Creating as many aout_Thread functions as configurations was one solution, /* Creating as many aout_Thread functions as configurations was one solution,
* examining the different cases in the Thread loop of an unique function was * examining the different cases in the Thread loop of an unique function was
* another. I chose the first solution. */ * another. I chose the first solution. */
void aout_U8MonoThread ( aout_thread_t * p_aout ); void aout_U8Thread ( aout_thread_t * p_aout );
void aout_U8StereoThread ( aout_thread_t * p_aout ); void aout_S8Thread ( aout_thread_t * p_aout );
void aout_S8MonoThread ( aout_thread_t * p_aout ); void aout_U16Thread ( aout_thread_t * p_aout );
void aout_S8StereoThread ( aout_thread_t * p_aout ); void aout_S16Thread ( aout_thread_t * p_aout );
void aout_U16MonoThread ( aout_thread_t * p_aout );
void aout_U16StereoThread ( aout_thread_t * p_aout );
void aout_S16MonoThread ( aout_thread_t * p_aout );
void aout_S16StereoThread ( aout_thread_t * p_aout );
void aout_SpdifThread ( aout_thread_t * p_aout ); void aout_SpdifThread ( aout_thread_t * p_aout );
void aout_FillBuffer ( aout_thread_t * p_aout, aout_fifo_t * p_fifo );
#define UPDATE_INCREMENT( increment, integer ) \ #define UPDATE_INCREMENT( increment, integer ) \
if ( ((increment).l_remainder += (increment).l_euclidean_remainder) >= 0 )\ if ( ((increment).l_remainder += (increment).l_euclidean_remainder) >= 0 )\
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* aout_ext-dec.c : exported fifo management functions * aout_ext-dec.c : exported fifo management functions
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: aout_ext-dec.c,v 1.9 2002/01/09 00:33:37 asmax Exp $ * $Id: aout_ext-dec.c,v 1.10 2002/01/14 12:15:10 asmax Exp $
* *
* Authors: Michel Kaempf <maxx@via.ecp.fr> * Authors: Michel Kaempf <maxx@via.ecp.fr>
* Cyril Deguet <asmax@via.ecp.fr> * Cyril Deguet <asmax@via.ecp.fr>
...@@ -114,22 +114,6 @@ aout_fifo_t * aout_CreateFifo( int i_type, int i_channels, long l_rate, ...@@ -114,22 +114,6 @@ aout_fifo_t * aout_CreateFifo( int i_type, int i_channels, long l_rate,
/* Initialize the new fifo structure */ /* Initialize the new fifo structure */
switch ( p_aout->fifo[i_fifo].i_type = i_type ) switch ( p_aout->fifo[i_fifo].i_type = i_type )
{ {
case AOUT_INTF_MONO_FIFO:
case AOUT_INTF_STEREO_FIFO:
p_aout->fifo[i_fifo].b_die = 0;
p_aout->fifo[i_fifo].i_channels = i_channels;
p_aout->fifo[i_fifo].b_stereo = ( i_channels == 2 );
p_aout->fifo[i_fifo].l_rate = l_rate;
p_aout->fifo[i_fifo].buffer = p_buffer;
p_aout->fifo[i_fifo].l_unit = 0;
InitializeIncrement( &p_aout->fifo[i_fifo].unit_increment,
l_rate, p_aout->l_rate );
p_aout->fifo[i_fifo].l_units = l_units;
break;
case AOUT_ADEC_MONO_FIFO: case AOUT_ADEC_MONO_FIFO:
case AOUT_ADEC_STEREO_FIFO: case AOUT_ADEC_STEREO_FIFO:
case AOUT_ADEC_SPDIF_FIFO: case AOUT_ADEC_SPDIF_FIFO:
...@@ -225,14 +209,6 @@ void aout_FreeFifo( aout_fifo_t * p_fifo ) ...@@ -225,14 +209,6 @@ void aout_FreeFifo( aout_fifo_t * p_fifo )
break; break;
case AOUT_INTF_MONO_FIFO:
case AOUT_INTF_STEREO_FIFO:
free( p_fifo->buffer );
p_fifo->i_type = AOUT_EMPTY_FIFO;
break;
case AOUT_ADEC_MONO_FIFO: case AOUT_ADEC_MONO_FIFO:
case AOUT_ADEC_STEREO_FIFO: case AOUT_ADEC_STEREO_FIFO:
case AOUT_ADEC_SPDIF_FIFO: case AOUT_ADEC_SPDIF_FIFO:
......
...@@ -2,8 +2,10 @@ ...@@ -2,8 +2,10 @@
* aout_s16.c: 16 bit signed audio output functions * aout_s16.c: 16 bit signed audio output functions
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id
* *
* Authors: Michel Kaempf <maxx@via.ecp.fr> * Authors: Michel Kaempf <maxx@via.ecp.fr>
* Cyril Deguet <asmax@via.ecp.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -32,76 +34,11 @@ ...@@ -32,76 +34,11 @@
#include "audio_output.h" #include "audio_output.h"
#include "aout_common.h" #include "aout_common.h"
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static void S16Play( aout_thread_t * p_aout, aout_fifo_t * p_fifo );
/***************************************************************************** /*****************************************************************************
* Functions * Functions
*****************************************************************************/ *****************************************************************************/
void aout_S16MonoThread( aout_thread_t * p_aout )
{
int i_fifo;
long l_buffer, l_buffer_limit, l_bytes;
/* As the s32_buffer was created with calloc(), we don't have to set this
* memory to zero and we can immediately jump into the thread's loop */
while ( ! p_aout->b_die )
{
vlc_mutex_lock( &p_aout->fifos_lock );
for ( i_fifo = 0; i_fifo < AOUT_MAX_FIFOS; i_fifo++ )
{
if( p_aout->fifo[i_fifo].b_die )
{
aout_FreeFifo( &p_aout->fifo[i_fifo] );
}
else
{
S16Play( p_aout, &p_aout->fifo[i_fifo] );
}
}
vlc_mutex_unlock( &p_aout->fifos_lock );
l_buffer_limit = p_aout->l_units; /* p_aout->b_stereo == 0 */
for ( l_buffer = 0; l_buffer < l_buffer_limit; l_buffer++ )
{
((s16 *)p_aout->buffer)[l_buffer] =
(s16)( ( p_aout->s32_buffer[l_buffer] / AOUT_MAX_FIFOS )
* p_aout->i_volume / 256 ) ;
p_aout->s32_buffer[l_buffer] = 0;
}
l_bytes = p_aout->pf_getbufinfo( p_aout, l_buffer_limit );
/* sizeof(s16) << (p_aout->b_stereo) == 2 */
p_aout->date = mdate() + ((((mtime_t)((l_bytes + 2 * p_aout->i_latency) / 2)) * 1000000)
/ ((mtime_t)p_aout->l_rate))
+ p_main->i_desync;
p_aout->pf_play( p_aout, (byte_t *)p_aout->buffer,
l_buffer_limit * sizeof(s16) );
if ( l_bytes > (l_buffer_limit * sizeof(s16)) )
{
msleep( p_aout->l_msleep );
}
}
vlc_mutex_lock( &p_aout->fifos_lock );
for ( i_fifo = 0; i_fifo < AOUT_MAX_FIFOS; i_fifo++ )
{
aout_FreeFifo( &p_aout->fifo[i_fifo] );
}
vlc_mutex_unlock( &p_aout->fifos_lock );
} void aout_S16Thread( aout_thread_t * p_aout )
void aout_S16StereoThread( aout_thread_t * p_aout )
{ {
int i_fifo; int i_fifo;
long l_buffer, l_buffer_limit, l_bytes; long l_buffer, l_buffer_limit, l_bytes;
...@@ -120,13 +57,13 @@ void aout_S16StereoThread( aout_thread_t * p_aout ) ...@@ -120,13 +57,13 @@ void aout_S16StereoThread( aout_thread_t * p_aout )
} }
else else
{ {
S16Play( p_aout, &p_aout->fifo[i_fifo] ); aout_FillBuffer( p_aout, &p_aout->fifo[i_fifo] );
} }
} }
vlc_mutex_unlock( &p_aout->fifos_lock ); vlc_mutex_unlock( &p_aout->fifos_lock );
l_buffer_limit = p_aout->l_units << 1; /* p_aout->b_stereo == 1 */ l_buffer_limit = p_aout->l_units << p_aout->b_stereo;
for ( l_buffer = 0; l_buffer < l_buffer_limit; l_buffer++ ) for ( l_buffer = 0; l_buffer < l_buffer_limit; l_buffer++ )
{ {
...@@ -138,10 +75,10 @@ void aout_S16StereoThread( aout_thread_t * p_aout ) ...@@ -138,10 +75,10 @@ void aout_S16StereoThread( aout_thread_t * p_aout )
l_bytes = p_aout->pf_getbufinfo( p_aout, l_buffer_limit ); l_bytes = p_aout->pf_getbufinfo( p_aout, l_buffer_limit );
/* sizeof(s16) << (p_aout->b_stereo) == 4 */ p_aout->date = mdate() + ((((mtime_t)((l_bytes + 4 * p_aout->i_latency) /
p_aout->date = mdate() + ((((mtime_t)((l_bytes + 4 * p_aout->i_latency) / 4)) * 1000000) (sizeof(s16) << p_aout->b_stereo))) * 1000000) /
/ ((mtime_t)p_aout->l_rate)) ((mtime_t)p_aout->l_rate)) + p_main->i_desync;
+ p_main->i_desync;
p_aout->pf_play( p_aout, (byte_t *)p_aout->buffer, p_aout->pf_play( p_aout, (byte_t *)p_aout->buffer,
l_buffer_limit * sizeof(s16) ); l_buffer_limit * sizeof(s16) );
...@@ -161,146 +98,3 @@ void aout_S16StereoThread( aout_thread_t * p_aout ) ...@@ -161,146 +98,3 @@ void aout_S16StereoThread( aout_thread_t * p_aout )
vlc_mutex_unlock( &p_aout->fifos_lock ); vlc_mutex_unlock( &p_aout->fifos_lock );
} }
/* Following functions are local */
static void S16Play( aout_thread_t * p_aout, aout_fifo_t * p_fifo )
{
long l_buffer = 0;
long l_buffer_limit, l_units;
switch ( p_fifo->i_type )
{
case AOUT_EMPTY_FIFO:
break;
case AOUT_INTF_MONO_FIFO:
if ( p_fifo->l_units > p_aout->l_units )
{
/* p_aout->b_stereo == 1 */
while ( l_buffer < (p_aout->l_units << 1) )
{
p_aout->s32_buffer[l_buffer++] +=
(s32)( ((s16 *)p_fifo->buffer)[p_fifo->l_unit] );
p_aout->s32_buffer[l_buffer++] +=
(s32)( ((s16 *)p_fifo->buffer)[p_fifo->l_unit] );
UPDATE_INCREMENT( p_fifo->unit_increment, p_fifo->l_unit )
}
p_fifo->l_units -= p_aout->l_units;
}
else /* p_fifo->l_units <= p_aout->l_units */
{
/* p_aout->b_stereo == 1 */
while ( l_buffer < (p_fifo->l_units << 1) )
{
p_aout->s32_buffer[l_buffer++] +=
(s32)( ((s16 *)p_fifo->buffer)[p_fifo->l_unit] );
p_aout->s32_buffer[l_buffer++] +=
(s32)( ((s16 *)p_fifo->buffer)[p_fifo->l_unit] );
UPDATE_INCREMENT( p_fifo->unit_increment, p_fifo->l_unit )
}
free( p_fifo->buffer ); /* !! */
p_fifo->i_type = AOUT_EMPTY_FIFO; /* !! */
}
break;
case AOUT_INTF_STEREO_FIFO:
if ( p_fifo->l_units > p_aout->l_units )
{
/* p_aout->b_stereo == 1 */
while ( l_buffer < (p_aout->l_units << 1) )
{
p_aout->s32_buffer[l_buffer++] +=
(s32)( ((s16 *)p_fifo->buffer)[2*p_fifo->l_unit] );
p_aout->s32_buffer[l_buffer++] +=
(s32)( ((s16 *)p_fifo->buffer)[2*p_fifo->l_unit+1] );
UPDATE_INCREMENT( p_fifo->unit_increment, p_fifo->l_unit )
}
p_fifo->l_units -= p_aout->l_units;
}
else /* p_fifo->l_units <= p_aout->l_units */
{
/* p_aout->b_stereo == 1 */
while ( l_buffer < (p_fifo->l_units << 1) )
{
p_aout->s32_buffer[l_buffer++] +=
(s32)( ((s16 *)p_fifo->buffer)[2*p_fifo->l_unit] );
p_aout->s32_buffer[l_buffer++] +=
(s32)( ((s16 *)p_fifo->buffer)[2*p_fifo->l_unit+1] );
UPDATE_INCREMENT( p_fifo->unit_increment, p_fifo->l_unit )
}
free( p_fifo->buffer );
p_fifo->i_type = AOUT_EMPTY_FIFO;
}
break;
case AOUT_ADEC_MONO_FIFO:
case AOUT_ADEC_STEREO_FIFO:
l_units = p_aout->l_units;
while ( l_units > 0 )
{
if( !p_fifo->b_next_frame )
{
if( NextFrame(p_aout, p_fifo, p_aout->date + ((((mtime_t)(l_buffer >> 1)) * 1000000) / ((mtime_t)p_aout->l_rate))) )
{
break;
}
}
l_buffer_limit = p_aout->l_units << p_aout->b_stereo;
while ( l_buffer < l_buffer_limit )
{
if( p_aout->b_stereo )
{
p_aout->s32_buffer[l_buffer++] +=
(s32)( ((s16 *)p_fifo->buffer)[2*p_fifo->l_unit] );
p_aout->s32_buffer[l_buffer++] +=
(s32)( ((s16 *)p_fifo->buffer)[2*p_fifo->l_unit+1] );
}
else
{
p_aout->s32_buffer[l_buffer++] +=
(s32)( ((s16 *)p_fifo->buffer)[p_fifo->l_unit] );
}
UPDATE_INCREMENT( p_fifo->unit_increment, p_fifo->l_unit )
if ( p_fifo->l_unit >=
((AOUT_FIFO_SIZE + 1) * (p_fifo->l_frame_size >> p_fifo->b_stereo)) )
{
p_fifo->l_unit -=
((AOUT_FIFO_SIZE + 1) * (p_fifo->l_frame_size >> p_fifo->b_stereo));
}
}
if ( p_fifo->l_units > l_units )
{
p_fifo->l_units -= l_units;
break;
}
else /* p_fifo->l_units <= l_units */
{
l_units -= p_fifo->l_units;
vlc_mutex_lock( &p_fifo->data_lock );
p_fifo->l_start_frame = p_fifo->l_next_frame;
vlc_cond_signal( &p_fifo->data_wait );
vlc_mutex_unlock( &p_fifo->data_lock );
/* p_fifo->b_start_frame = 1; */
p_fifo->l_next_frame += 1;
p_fifo->l_next_frame &= AOUT_FIFO_SIZE;
p_fifo->b_next_frame = 0;
}
}
break;
default:
intf_DbgMsg("aout debug: unknown fifo type (%i)", p_fifo->i_type);
break;
}
}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* aout_s8.c: 8 bit signed audio output functions * aout_s8.c: 8 bit signed audio output functions
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: aout_s8.c,v 1.5 2001/12/30 07:09:56 sam Exp $ * $Id: aout_s8.c,v 1.6 2002/01/14 12:15:10 asmax Exp $
* *
* Authors: Michel Kaempf <maxx@via.ecp.fr> * Authors: Michel Kaempf <maxx@via.ecp.fr>
* *
...@@ -36,13 +36,8 @@ ...@@ -36,13 +36,8 @@
/***************************************************************************** /*****************************************************************************
* Functions * Functions
*****************************************************************************/ *****************************************************************************/
void aout_S8MonoThread( aout_thread_t * p_aout ) void aout_S8Thread( aout_thread_t * p_aout )
{ {
intf_ErrMsg( "aout error: 8 bit signed mono thread unsupported" ); intf_ErrMsg( "aout error: 8 bit signed thread unsupported" );
}
void aout_S8StereoThread( aout_thread_t * p_aout )
{
intf_ErrMsg( "aout error: 8 bit signed stereo thread unsupported" );
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* aout_u16.c: 16 bit unsigned audio output functions * aout_u16.c: 16 bit unsigned audio output functions
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: aout_u16.c,v 1.5 2001/12/30 07:09:56 sam Exp $ * $Id: aout_u16.c,v 1.6 2002/01/14 12:15:10 asmax Exp $
* *
* Authors: Michel Kaempf <maxx@via.ecp.fr> * Authors: Michel Kaempf <maxx@via.ecp.fr>
* *
...@@ -36,13 +36,8 @@ ...@@ -36,13 +36,8 @@
/***************************************************************************** /*****************************************************************************
* Functions * Functions
*****************************************************************************/ *****************************************************************************/
void aout_U16MonoThread( aout_thread_t * p_aout ) void aout_U16Thread( aout_thread_t * p_aout )
{ {
intf_ErrMsg( "aout error: 16 bit unsigned mono thread unsupported" ); intf_ErrMsg( "aout error: 16 bit unsigned thread unsupported" );
}
void aout_U16StereoThread( aout_thread_t * p_aout )
{
intf_ErrMsg( "aout error: 16 bit unsigned stereo thread unsupported" );
} }
This diff is collapsed.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* audio_output.c : audio output thread * audio_output.c : audio output thread
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: audio_output.c,v 1.70 2002/01/09 00:33:37 asmax Exp $ * $Id: audio_output.c,v 1.71 2002/01/14 12:15:10 asmax Exp $
* *
* Authors: Michel Kaempf <maxx@via.ecp.fr> * Authors: Michel Kaempf <maxx@via.ecp.fr>
* Cyril Deguet <asmax@via.ecp.fr> * Cyril Deguet <asmax@via.ecp.fr>
...@@ -212,27 +212,27 @@ static int aout_SpawnThread( aout_thread_t * p_aout ) ...@@ -212,27 +212,27 @@ static int aout_SpawnThread( aout_thread_t * p_aout )
case AOUT_FMT_U8: case AOUT_FMT_U8:
intf_WarnMsg( 2, "aout info: unsigned 8 bits mono thread" ); intf_WarnMsg( 2, "aout info: unsigned 8 bits mono thread" );
l_bytes = 1 * sizeof(u8) * p_aout->l_units; l_bytes = 1 * sizeof(u8) * p_aout->l_units;
pf_aout_thread = aout_U8MonoThread; pf_aout_thread = aout_U8Thread;
break; break;
case AOUT_FMT_S8: case AOUT_FMT_S8:
intf_WarnMsg( 2, "aout info: signed 8 bits mono thread" ); intf_WarnMsg( 2, "aout info: signed 8 bits mono thread" );
l_bytes = 1 * sizeof(s8) * p_aout->l_units; l_bytes = 1 * sizeof(s8) * p_aout->l_units;
pf_aout_thread = aout_S8MonoThread; pf_aout_thread = aout_S8Thread;
break; break;
case AOUT_FMT_U16_LE: case AOUT_FMT_U16_LE:
case AOUT_FMT_U16_BE: case AOUT_FMT_U16_BE:
intf_WarnMsg( 2, "aout info: unsigned 16 bits mono thread" ); intf_WarnMsg( 2, "aout info: unsigned 16 bits mono thread" );
l_bytes = 1 * sizeof(u16) * p_aout->l_units; l_bytes = 1 * sizeof(u16) * p_aout->l_units;
pf_aout_thread = aout_U16MonoThread; pf_aout_thread = aout_U16Thread;
break; break;
case AOUT_FMT_S16_LE: case AOUT_FMT_S16_LE:
case AOUT_FMT_S16_BE: case AOUT_FMT_S16_BE:
intf_WarnMsg( 2, "aout info: signed 16 bits mono thread" ); intf_WarnMsg( 2, "aout info: signed 16 bits mono thread" );
l_bytes = 1 * sizeof(s16) * p_aout->l_units; l_bytes = 1 * sizeof(s16) * p_aout->l_units;
pf_aout_thread = aout_S16MonoThread; pf_aout_thread = aout_S16Thread;
break; break;
default: default:
...@@ -249,27 +249,27 @@ static int aout_SpawnThread( aout_thread_t * p_aout ) ...@@ -249,27 +249,27 @@ static int aout_SpawnThread( aout_thread_t * p_aout )
case AOUT_FMT_U8: case AOUT_FMT_U8:
intf_WarnMsg( 2, "aout info: unsigned 8 bits stereo thread" ); intf_WarnMsg( 2, "aout info: unsigned 8 bits stereo thread" );
l_bytes = 2 * sizeof(u8) * p_aout->l_units; l_bytes = 2 * sizeof(u8) * p_aout->l_units;
pf_aout_thread = aout_U8StereoThread; pf_aout_thread = aout_U8Thread;
break; break;
case AOUT_FMT_S8: case AOUT_FMT_S8:
intf_WarnMsg( 2, "aout info: signed 8 bits stereo thread" ); intf_WarnMsg( 2, "aout info: signed 8 bits stereo thread" );
l_bytes = 2 * sizeof(s8) * p_aout->l_units; l_bytes = 2 * sizeof(s8) * p_aout->l_units;
pf_aout_thread = aout_S8StereoThread; pf_aout_thread = aout_S8Thread;
break; break;
case AOUT_FMT_U16_LE: case AOUT_FMT_U16_LE:
case AOUT_FMT_U16_BE: case AOUT_FMT_U16_BE:
intf_WarnMsg( 2, "aout info: unsigned 16 bits stereo thread" ); intf_WarnMsg( 2, "aout info: unsigned 16 bits stereo thread" );
l_bytes = 2 * sizeof(u16) * p_aout->l_units; l_bytes = 2 * sizeof(u16) * p_aout->l_units;
pf_aout_thread = aout_U16StereoThread; pf_aout_thread = aout_U16Thread;
break; break;
case AOUT_FMT_S16_LE: case AOUT_FMT_S16_LE:
case AOUT_FMT_S16_BE: case AOUT_FMT_S16_BE:
intf_WarnMsg( 2, "aout info: signed 16 bits stereo thread" ); intf_WarnMsg( 2, "aout info: signed 16 bits stereo thread" );
l_bytes = 2 * sizeof(s16) * p_aout->l_units; l_bytes = 2 * sizeof(s16) * p_aout->l_units;
pf_aout_thread = aout_S16StereoThread; pf_aout_thread = aout_S16Thread;
break; break;
case AOUT_FMT_AC3: case AOUT_FMT_AC3:
......
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