[PATCH] alsa_seqmidi.c assertion failure.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] alsa_seqmidi.c assertion failure.

KenEllinwood

Hi,

The following patch comments out an assert() that fails when jack_frame_time() returns a value less than jack_last_frame_time() and a midi event is sent with a time close to the end of the period. The assertion failure causes jackd to quit unexpectedly.



diff -ur drivers/alsa-midi/alsa_seqmidi.c drivers/alsa-midi/alsa_seqmidi.c.new
--- drivers/alsa-midi/alsa_seqmidi.c    2007-08-07 23:15:09.000000000 -0700
+++ drivers/alsa-midi/alsa_seqmidi.c.new        2007-08-07 23:14:39.000000000 -0700
@@ -849,7 +849,7 @@
                        frame_offset = info->nframes + jack_event.time;
                        error_log("internal xrun detected: frame_offset = %lld\n", frame_offset);
                }
-               assert (frame_offset < info->nframes*2);
+               // assert (frame_offset < info->nframes*2);

                out_time = info->alsa_time + (frame_offset * NSEC_PER_SEC) / info->sample_rate;


Ken








       
____________________________________________________________________________________
Sick sense of humor? Visit Yahoo! TV's
Comedy with an Edge to see what's on, when.
http://tv.yahoo.com/collections/222

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] alsa_seqmidi.c assertion failure.

Dmitry Baikov
On 8/8/07, Ken Ellinwood <[hidden email]> wrote:

> The following patch comments out an assert() that fails when jack_frame_time() returns a value less than jack_last_frame_time() and a midi event is sent with a time close to the end of the period. The assertion failure causes jackd to quit unexpectedly.
>
> diff -ur drivers/alsa-midi/alsa_seqmidi.c drivers/alsa-midi/alsa_seqmidi.c.new
> --- drivers/alsa-midi/alsa_seqmidi.c    2007-08-07 23:15:09.000000000 -0700
> +++ drivers/alsa-midi/alsa_seqmidi.c.new        2007-08-07 23:14:39.000000000 -0700
> @@ -849,7 +849,7 @@
>                         frame_offset = info->nframes + jack_event.time;
>                         error_log("internal xrun detected: frame_offset = %lld\n", frame_offset);
>                 }
> -               assert (frame_offset < info->nframes*2);
> +               // assert (frame_offset < info->nframes*2);
>
>                 out_time = info->alsa_time + (frame_offset * NSEC_PER_SEC) / info->sample_rate;
>

Seems, you use nperiods > 2. And this assert asserts that nperiods==2 ;)
I don't think this check should be an assert at all, more likely a
debug_log message.
Commented out as of rev 1057.

Thank you.

Dmitry.

P.S. And sorry for such a slow reply ;)

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel