[mythtv] [PATCH] audiooutputalsa
david at thegeorges.us
Sun Aug 15 15:38:39 EDT 2004
This patch addresses a couple of issues with audiooutputalsa and has
some cleanups and additional debugging to help anyone troubleshooting
alsa issues on their system.
Currently if WriteAudio fails it closes pcm_handle. This patch adds the
ability to try to open an audio file handle again. If the re-open fails
it will then then return the same as it previously did. This was
discovered when I was troubleshooting audio problems on an HDTV stream.
AudioOutputAlsa::Reconfigure was reworked a little to support this.
Currently if the audiolen was the same as the fragment size the audio
thread would sit there waiting for more data. I didn't really see the
point in waiting so when there are 4096 bytes waiting to be sent, send it.
Currently if the audio rates don't match the logs would show mismatch
but the second arg wasn't the mismatched rate. This is a resend of a
patch I sent on July 13th.
Patch to log error if snd_pcm_hw_params_malloc fails. It stills works
the same as it currently does, except now logs an error to notify you.
Added pcm_handle = NULL; after a snd_pcm_close(pcm_handle) in
Remove unused variable "written" in WriteAudio.
Log warning that snd_pcm_delay return is meaningless unless alsa is in
the running state.
Cleaned up a couple of non-4space indents.
Thats about it for this one.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 12291 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20040815/b4b7d9aa/audiooutputalsa.bin
More information about the mythtv-dev