[icecast] Server drops client - problem with IceS?

Jørgen Elgaard Larsen maillistparticipant at elgaard.net
Thu Feb 5 00:17:19 UTC 2004

Geoff Shang wrote:
> hmmm.  Wonder if specifying both nominal and quality is causing an issue
> somewhere?

I don't think so. Using just one of them does not make the error go away.

<p>I have, however, found the error (after some debugging):

In the alsa imput module (placed in the source file im_alsa.c), the 
sample rate on the alsa device is set using the 
snd_pcm_hw_params_set_rate_near() call.

Reading the ALSA API it was suddenly clear to me, that this means that 
if the sound card does not like the sample rate, you ask for, alsa will 
just pick the nearest samplerate.

In my case, I asked for 44100, but the alsa driver was really 
initialised to 48000. No wonder there was too many samples when the 
encoder still thinks that it should use 44100 :-S

I have made a patch to im_alsa.c so that you at least will be warned 
that it selects another sample rate than you ordered. I will post it to 
the developer list.

<p>Had it not been for open source, I would never have found this one!


<p>Jørgen Elgaard Larsen
IT Manager
University Radio of Copenhagen

--- >8 ----
List archives:  http://www.xiph.org/archives/
icecast project homepage: http://www.icecast.org/
To unsubscribe from this list, send a message to 'icecast-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.

More information about the Icecast mailing list