Mixer question

I am new to mAirPlay and am trying to get my head around all the features it has …

One of these is working out how to switch on and off the ‘line in’ (which would carry the news).

There is a page on the Wiki http://forum.mairlist.de/viewtopic.php?t=533&highlight=external+switching which appears to fit the bill but when I try to run the code to determine what sound cards are available I get errors saying that the GetMixerCount and GetMixer are not recognised.

I am not a Pascal programmer so am probably missing something very obvious - Any clues/pointers?

Ron, the link in your post was to a Forum thread: the Wiki page is http://wiki.mairlist.com/index.php/Things_You_Can_Do_with_Scripts.

That said… :slight_smile:

  1. You are correct: the GetMixerCount function appears to be broken. I recall Torben saying recently that this part of scripting wasn’t working. The good news is (as you will find) that Torben is usually VERY fast at fixing this sort of thing; generally within a week at most.

  2. You do require a ‘begin’ and ‘end.’ line (including the full stop after the ‘end’!) around the main Script code. I have just changed the Wiki page so that the two Scripts are now complete and can both be Pasted into an .mls file…

Please feel free to post any questions about mAirList in this Forum, but also please check the Wiki (currently I am adding/changing things to this pretty much daily) and Search in here first.

Welcome to mAirList, and I hope you enjoy both the program and this Forum! We’ll all be glad to help in any way we can.


For consistency with the other global function names (IOWarrior, ComPort, …), “GetMixerCount” and “GetMixer” have been renamed to “MixerCount” and “Mixer”, respectively, a while ago.

Have a look at the mAirListScript.chm help file (available from the Documentation page on the website) and navigate to Units -> mAirListScript -> Functions.


Cad - Thanks for the info - sorry about the wrong link description - the code was the same!

I have checked through the Forum and Wiki over the last few days and am slowly getting to know what it (and is not) possible. A lot of the info is historic and does not mean a lot to me only having experience from version 2 onwards but at least I can see how things have developed.

With regard to the mixer - I am a bit further forward thanks to Torben.

I have modified the ‘What mixers do I have’ code to

[code]var i: integer;

for i := 0 to MixerCount - 1 do
SystemLog('Mixer ’ + IntToStr(i)+ ': ’ + MixerCount(i).GetProductName);
but get an error message ‘Error 7:59 Invalid number of parameters’ when I run it.
(BTW - where can I find the SystemLog ???)

Using trial and error I have discovered that

begin SystemLog(IntToStr(Mixer(0).GetDestinationCount)); Mixer(0).Mute(1,4) end.
controls my on-board soundcard but Mixer(1).Mute(1,x) doesn’t seem to control the second one hence trhe need to get the first script working.

Further pointers would be appreciated.

p.s. Cad - I can see that you have been busy on the Wiki and your efforts are appreciated. The change of function names has highlighted the need for an up-to-date reference source and this will fut that bill!

but get an error message 'Error 7:59 Invalid number of parameters' when I run it.

You mistyped the function name, it must read “Mixer(i).GetProductName” rather than “MixerCount(i).GetProductName”.

(BTW - where can I find the SystemLog ?????)

In the drop-down box at the bottom of the main window.


Thanks Torben, it’s funny how everything is so obvious once someone points it out to you isn’t it !!!

I now have the aux input switching on both mixers (strange that the on-board channel is Mixer(0).Mute(1,4) and the Soundblaster Live is Mixer(1).Mute(0,6). The wonders of windows !!!

Now I have this firmly in my head it raises a couple of questions on playlists but I will start a new thread for that!