[LAD] How to save and restore MIDI connexion (ALSA sequencer)

From: Stéphane Brunner <stephane.brunner@email-addr-hidden>
Date: Sun Dec 09 2007 - 21:49:10 EET

Hello !

In my application (LiveMix - http://livemix.codingteam.net/) I just
implement the MIDI support.
To initialize the MIDI I do :
snd_seq_open(&seq, "default", SND_SEQ_OPEN_DUPLEX, 0);
snd_seq_set_client_name(seq, "LiveMix");
m_iPort = snd_seq_create_simple_port(seq, "control", 0,
SND_SEQ_PORT_TYPE_MIDI_GENERIC | SND_SEQ_PORT_TYPE_SOFTWARE |
SND_SEQ_PORT_TYPE_APPLICATION);
m_iMidi = snd_seq_create_simple_port(seq, "control",
                SND_SEQ_PORT_CAP_READ | SND_SEQ_PORT_CAP_SUBS_READ |
SND_SEQ_PORT_CAP_WRITE | SND_SEQ_PORT_CAP_SUBS_WRITE,
                SND_SEQ_PORT_TYPE_APPLICATION);

Than with patchage I connect the midi port to others port...

Than I want to know with port will be connected on witch other to reconnect
it on other LiveMix run.

I sea the function :
int snd_seq_connect_from(snd_seq_t *seq, int my_port, int src_client, int
src_port);
int snd_seq_connect_to(snd_seq_t *seq, int my_port, int dest_client, int
dest_port);
To do the connexion but I don't found not the function to know where I'm
actually connected.

CU & thanks in advance.
Stéphane

-- 
Stéphane Brunner
mail : stephane.brunner@gmail.com
messageries instantanées : stephane.brunner@gmail.com (
http://talk.google.com)
--------------------------------------
http://www.ubuntu-fr.org - Distribution Linux
http://fr.wikipedia.org - Encyclopédie communautaire
http://mozilla-europe.org - Navigateur internet / Client de messagerie
http://framasoft.net - Annuaire de logiciel libre (gratuit)
http://jeuxlibres.net - Jeux Libres (gratuit)
--------------------------------------
Il existe 10 sortes de personnes : celles qui connaissent le binaire, et les
autres.
Si Microsoft inventait un truc qui plante pas, ce serait un clou.
Si un jour on te reproche que ton travail n'est pas un travail de
professionnel, dis toi que :
Des amateurs ont construit l'arche de Noé, et des professionnels le Titanic.

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev
Received on Mon Dec 10 00:15:02 2007

This archive was generated by hypermail 2.1.8 : Mon Dec 10 2007 - 00:15:02 EET