Update of /cvsroot/xine/xine-lib/src/audio_out
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv32589
Modified Files:
audio_alsa_out.c
Log Message:
alsa patches from Julian Scheel and Matthias Kretz
Index: audio_alsa_out.c
===================================================================
RCS file: /cvsroot/xine/xine-lib/src/audio_out/audio_alsa_out.c,v
retrieving revision 1.167
retrieving revision 1.168
diff -u -r1.167 -r1.168
--- audio_alsa_out.c 25 Feb 2007 21:54:04 -0000 1.167
+++ audio_alsa_out.c 25 Feb 2007 22:33:25 -0000 1.168
@@ -664,6 +664,15 @@
printf("audio_alsa_out:delay:ENTERED\n");
#endif
err=snd_pcm_delay( this->audio_fd, &delay );
+
+ int state = snd_pcm_state(this->audio_fd);
+
+ /* check for idle states, which need to be handled as delay=0 */
+ if(state == SND_PCM_STATE_PREPARED || state == SND_PCM_STATE_PAUSED ||
+ state == SND_PCM_STATE_OPEN || SND_PCM_STATE_XRUN) {
+ return 0;
+ }
+
#ifdef LOG_DEBUG
printf("audio_alsa_out:delay:delay all=%ld err=%d\n",delay, err);
gettimeofday(&now, 0);
@@ -1505,6 +1514,13 @@
this->capabilities |= AO_CAP_FLOAT32;
xprintf(class->xine, XINE_VERBOSITY_LOG, _("32bit "));
}
+ if (0 == (this->capabilities & (AO_CAP_FLOAT32 | AO_CAP_24BITS |
AO_CAP_16BITS | AO_CAP_8BITS))) {
+ xprintf (this->class->xine, XINE_VERBOSITY_DEBUG,
+ "\naudio_alsa_out: no supported PCM format found\n");
+ snd_pcm_close(this->audio_fd);
+ free(this);
+ return NULL;
+ }
if (!(snd_pcm_hw_params_test_channels(this->audio_fd, params, 1))) {
this->capabilities |= AO_CAP_MODE_MONO;
xprintf(class->xine, XINE_VERBOSITY_LOG, _("mono "));
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Xine-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xine-cvslog