[pulseaudio-discuss] Assertion failure pa_frame_aligned(nbytes, &i->sink->sample_spec)
Brendon Costa
brendon.j.costa at gmail.com
Mon Mar 23 03:33:13 PDT 2015
Thanks wasn't too difficult to track down after your info. The max request
was not correct in my module.
On 21 March 2015 at 04:48, Tanu Kaskinen <tanu.kaskinen at linux.intel.com>
wrote:
> On Fri, 2015-03-20 at 08:04 +1100, Brendon Costa wrote:
> > Hi all,
> >
> > I am developing a pulse audio sink module for a custom networked audio
> > device I have.
> >
> > This device only supports a very specific format: 3 channel
> > PA_SAMPLE_S16NE @ 32000Hz and uses a custom TCP protocol.
> >
> > I am using the esound-sink module as a basis to develop my one and
> > have setup my pa_sample_spec accordingly. The module starts up,
> > pushing silence through to the device fine.
> >
> > However when I try and connect a music player source to it I get the
> > following assertion:
> >
> > sink-input.c: Assertion 'pa_frame_aligned(nbytes,
> > &i->sink->sample_spec)' failed at pulsecore/sink-input.c:1168,
> > function pa_sink_input_update_max_request(). Aborting.
> >
> > I couldn't make much sense of this assertion. Is someone able to help
> > me out with its meaning/cause?
>
> The assertion means that the nbytes parameter of
> pa_sink_input_update_max_request() was not a multiple of the size of one
> frame. If the sink in question is the sink that you're developing, i.e.
> the audio format is 3 channels with 16-bit samples, the size of one
> frame is 6 bytes. Check who called the function and why it gave a number
> that is not a multiple of 6.
>
> > My original guess is that it is related to this specific sample spec
> > not matching the music players source spec (though weird that such an
> > error would be an assertion so I am probably wrong).
> >
> > Is pulse audio supposed to auto "match" sample specs between sinks and
> > sources?
>
> You probably mean "sink inputs" instead of "sources". A music player
> application is represented by a "sink input". A "source" would be a
> capture device.
>
> But to answer your question: yes, when the audio format of a sink input
> doesn't match the format of the sink, the audio is automatically
> converted to the right format.
>
> --
> Tanu
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20150323/f8707930/attachment.html>
More information about the pulseaudio-discuss
mailing list