[yoshimi] Re: MusiIO [audio|midi]GetClient[name|id]

  • From: blubee blubeeme <gurenchan@xxxxxxxxx>
  • To: yoshimi@xxxxxxxxxxxxx
  • Date: Wed, 20 Dec 2017 01:21:36 +0800

I ran into a little bit of a rough patch on my end but I've been sorting
that out.

I'll run some tests and see, does Yoshimi have debug printing or it'll have
to be printf?

On Tue, Dec 19, 2017 at 11:59 PM, Will Godfrey <willgodfrey@xxxxxxxxxxxxxxx>
wrote:

On Mon, 4 Dec 2017 00:55:57 +0800
blubee blubeeme <gurenchan@xxxxxxxxx> wrote:

I'm looking at the MusicIO class and their implementation on github:
https://github.com/Yoshimi/yoshimi/blob/master/src/MusicIO/MusicIO.h

AlsaEngine has a pretty straight forward implementation:
string AlsaEngine::audioClientName(void)
{
string name = "yoshimi";
if (!synth->getRuntime().nameTag.empty())
name += ("-" + synth->getRuntime().nameTag);
return name;
}

while the jack implementation seems a bit more involved.

string JackEngine::clientName(void)
{
if (jackClient)
return string(jack_get_client_name(jackClient));
else
synth->getRuntime().Log("clientName() with null jackClient");
return string("Oh, yoshimi :-(");
}

Is the whole getclient[name|id] to support sessions? What's the purpose of
having these names/ ids?

I am just trying to get some clarification of the reasoning behind them.

Finally, had time to get back to this.

In theory you could work without names, but then how would you know which
of the
anonymous port numbers represented Yoshimi?

This applies to anything that might want to connect to it. Ports can (and
will)
change depending on the order applications are started, whereas the names
will
be unique. We make sure this is the case with Yoshimi by adding a
unique numerical suffix if there are already instances running.

--
Will J Godfrey
http://www.musically.me.uk
Say you have a poem and I have a tune.
Exchange them and we can both have a poem, a tune, and a song.
Yoshimi source code is available from either:
https://sourceforge.net/projects/yoshimi
Or: https://github.com/Yoshimi/yoshimi
Our list archive is at: https://www.freelists.org/archive/yoshimi
To post, email to yoshimi@xxxxxxxxxxxxx

Other related posts: