diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2004-07-06 22:53:22 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2004-07-06 22:53:22 +0000 |
commit | 40aab85f00b16aedeb638bd4ff7693d908ad5d60 (patch) | |
tree | d32ac09a4fe0ec1092ed575dcc38e1572f6c4e42 /src/xine-engine/audio_out.c | |
parent | 4bf855750a173f0c002a231cc6307c47719867d1 (diff) | |
download | xine-lib-40aab85f00b16aedeb638bd4ff7693d908ad5d60.tar.gz xine-lib-40aab85f00b16aedeb638bd4ff7693d908ad5d60.tar.bz2 |
fix a long standing bug: streams were not played till their very end, because
finished event was sent to frontend before the output fifos were empty.
add a test for the number of streams attached to the output port. this will
prevent deadlocking on multi-streams scenarios where fifos don't ever get empty.
CVS patchset: 6777
CVS date: 2004/07/06 22:53:22
Diffstat (limited to 'src/xine-engine/audio_out.c')
-rw-r--r-- | src/xine-engine/audio_out.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c index 83401599b..49838df1a 100644 --- a/src/xine-engine/audio_out.c +++ b/src/xine-engine/audio_out.c @@ -17,7 +17,7 @@ * along with self program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: audio_out.c,v 1.181 2004/06/27 13:33:57 mroi Exp $ + * $Id: audio_out.c,v 1.182 2004/07/06 22:53:22 miguelfreitas Exp $ * * 22-8-2001 James imported some useful AC3 sections from the previous alsa driver. * (c) 2001 Andy Lo A Foe <andy@alsaplayer.org> @@ -1582,6 +1582,7 @@ static uint32_t ao_get_capabilities (xine_audio_port_t *this_gen) { static int ao_get_property (xine_audio_port_t *this_gen, int property) { aos_t *this = (aos_t *) this_gen; + xine_stream_t *cur; int ret; switch (property) { @@ -1593,6 +1594,15 @@ static int ao_get_property (xine_audio_port_t *this_gen, int property) { ret = this->audio_loop_running ? this->out_fifo->num_buffers : -1; break; + case AO_PROP_NUM_STREAMS: + ret = 0; + pthread_mutex_lock(&this->streams_lock); + for (cur = xine_list_first_content(this->streams); cur; + cur = xine_list_next_content(this->streams)) + ret++; + pthread_mutex_unlock(&this->streams_lock); + break; + case AO_PROP_AMP: ret = this->amp_factor*100; break; |