[Alsaplayer-devel] midi plugin

Andy Lo A Foe andy@alsaplayer.org
Sun, 14 Apr 2002 02:43:14 +0200


On Sat, Apr 13, 2002 at 02:18:33PM -1000, Greg Lee wrote:

> alsaplayer aborts with signal 11 on my system, after I
> updated from CVS a couple of hours ago.  I removed midi-in
> from the input/ directory, to make sure it wasn't me
> causing it.  It wasn't.  The text interface is ok.  When
> I start the gtk interface under gdb, after showing four
> threads created, gdb says ptrace can't find a thread.

I made some changes to the playlist stuff. Did the gtk interface build
OK? Can you do a backtrace (bt) after the crash?

> I've had the midi plugin look for it's patch initialization file
> first in ~/.alsaplayer/ .  I plan to automate the construction
> of the patch initialization file for arbitrary soundfonts,
> so users can put a soundfont in ~/.alsaplayer/, the plugin
> will notice the soundfont there on startup and create a
> patch init file for it.  Does that sound reasonable?

Sure...

> Speaking of initialization, are the _init and _shutdown
> procedures for input plugins going to be called one of

I didn't realize init() wasn't called! And now that I look further I
notice there will also be problems when we actually call it. There can
be multiple instances of CorePlayer, but the plugins are only loaded a
single time (by dlopen) so we need to do refcounting. init() should only
be called for the first reference, and shutdown() only when there are no
more references. This will take some more hacking. As soon as we figure
out the current crash I'll work on that.

> these days?  When _shutdown is called, what am I supposed
> to do?  During playing, using a soundfont, I have the
> soundfont open and lots of memory malloc'd.  Must I free
> the memory, or does that happen automatically when I am
> unplugged.

Everything that you allocate is your responsability. data that is shared
between multiple instances should be alloc/deallocated in
init()/shutdown(). Data needed per instance should be alloc/dealloceted
in open()/close() (note that init/shutdown is of course broken right
now).

> One more thing.  Making commits is really quite a job for
> me, because I have to do everything one step and one file at a time.
> For each changed file, I have to remove my changed version,
> update that file to get the old version, substitute my changed
> version, and commit it.  Because there's something wrong with
> my CVS account -- cvs keeps aborting with the message:
>   Could not chdir to home directory /home/users/p/pg/pglgreg: No such file or directory

This looks like an error on Sourceforge. Can you login with your account
on shells.sourceforge.net? The directory above should be your home
directory on shells so I would suggest trying to ssh to
shells.sourceforge.net and see if you get a similar error. If so I think
you should contact SF support.

> My best guess is that there is some mismatch between the path
> of my personal page on sourceforge and what cvs is assuming about
> that path.  Any suggestions?

Other than the above, no.

Regards,
Andy