From: Bengt "M˙ffffe5nsson" Subject: Re: snd_seq_sync_output_queue does not work Date: Thu, 2 Dec 2004 13:01:46 -0800 (PST) Message-ID: <20041202210146.78140.qmail@web42102.mail.yahoo.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: In-Reply-To: Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Clemens Ladisch Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org Thank you for your quick reply. I've looked at amidi and maybe that is a solution. It's a little bit annoying though, since receiving works so fine. I would prefer a symetrical solution that is easy to map to tha java api. Maybe a sleep is easiest, but I'll consider that when I've had some myself. /Bengt --- Clemens Ladisch wrote: > Bengt Månsson wrote: > > I'm trying to make an app where I need to exchange > an > > 18k sysex. I use Rh9. > > I think I've worked out the receiving part, but > > sending will not work. > > I chop the big sysex into 256 byte blocks and send > in > > a sequence. This seems to work fine when I run it > > stepwise in the debugger, but crash when I run it > at > > full speed. > > The sequencer isn't designed to handle big sysexs. > Due to the > message-based architecture it's difficult to signal > back to the > sending application that the output buffer is full. > > I'd guess some message couldn't be delivered and was > thrown away. > > Try to limit the rate of messages so that you don't > exceed the MIDI > data rate. > > > I think I've traced the problem down to the call > to > > snd_seq_sync_output_queue. I expect that call to > hang > > until the output is drained, and return a 0. > > What happens is that the call seems to return > > immediately with a 1. > > The documentation is wrong, any nonnegative return > value indicates > success (the current implementation always returns > 1). > > snd_seq_sync_output_queue waits until all events > have been sent. At > this point, it's too late to detect events than > cannot be delivered at > the destination. > > > The documentation, if it actually existed, would > tell you to use the > rawmidi API for big chunks of sysex data. See the > amidi program for > an example. > > > HTH > Clemens > > __________________________________ Do you Yahoo!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/