[yoshimi] Re: Big MusicClient rewrite :)

  • From: Andrew Deryabin <andrew@xxxxxxxx>
  • To: yoshimi@xxxxxxxxxxxxx
  • Date: Thu, 31 Dec 2015 02:30:39 +0400

Ok! :)

31.12.2015 02:29, Will Godfrey пишет:

Picked up the LV2 adjustment and updated changelog :)
Pushed to github as well.

On Thu, 31 Dec 2015 01:59:03 +0400
Andrew Deryabin <andrew@xxxxxxxx> wrote:

I'm happy too :). This was an interesting task ;)

31.12.2015 01:57, Will Godfrey пишет:
Works fine now. I just tested it on all rates that jack supports from 22000 up
to 192000

Very pleased with this :) :)


On Thu, 31 Dec 2015 01:46:56 +0400
Andrew Deryabin <andrew@xxxxxxxx> wrote:

The fix is ready to test!

31.12.2015 01:41, Andrew Deryabin пишет:
Ok, I know the reason. Now fixing.

31.12.2015 01:40, Will Godfrey пишет:
On Thu, 31 Dec 2015 00:51:04 +0400
Andrew Deryabin <andrew@xxxxxxxx> wrote:

Hi Will, All,

Just pushed new commit 131ace1.

Don't panic about 8 removed files. If you will ever need them, you can
checkout any previous commit and they will appear again.

Here is a step-by-step explanation of new changes:

I removed 8 files: AlsaJackClient.cpp/h, JackClient.cpp/h,
JackAlsaClient.cpp/h, AlsaJackClient.cpp/h.
Now all combo driver functionality is handled by one class:
MusicClient.

Interface became more universal. How it works:

Here is the function newMusicClient in MusicClient class. Before my
changes this function created default audio/midi driver pair and if
this
had no success, yoshimi simply failed to start.

Now the behavior is different.
There are 3 drivers for audio: jack_audio, alsa_audio, null_audio
and 3 drivers for midi: jack_midi, alsa_midi, null_midi.

When creating new music client, default driver pair is tested first. If
it fails, then new algorithm tries to open combos in following order:

jack_audio/jack_midi (if is was not the first)
jack_audio/alsa_midi
alsa_audio/alsa_midi
jack_audio/no_midi
alsa_audio/no_midi
no_audio/no_midi

Now yoshimi will never fail it's startup because of new driver
'no_audio' which is a simple thread, that calls masterAudio at constant
intervals emulating virtual audio device.

Now, if default audio/midi pair fails, no questions are asked and
fallback pairs are probed automatically. Don't know if there is a
probability that user will tap 'No' to question about switching to
alternate pair.
That was remarkably quick work.

I've just checked it out. The changes work well but there is a problem.

When using Jack audio the pitch is shifted about a semitone high, and
the
startup message says samplerate is 44.1K although I have jack set to
48K.
If I set jack to 44.1K then it's OK.



--
Regards,
Andrew

Yoshimi source code is available from either:
http://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: