gusucode.com > target工具箱matlab源码程序 > target/extensions/operatingsystem/linux/blks/masks/audio_capture_callback.m

    function varargout = audio_capture_callback(varargin)
%AUDIO_CAPTURE_CALLBACK Mask Helper Function for Audio Capture block.
%

% Copyright 2010-2011 The MathWorks, Inc.

blk = gcbh;

% Check on input "action"
action = varargin{1};
switch action
    case 'MaskInitialization'
        updatePortLabels(blk);

    otherwise
        error(message('TARGETFOUNDATION:utils:BlockBuilder_UnknownCallback', action));
end

%--------------------------------------------------------------------------
function updatePortLabels(blk)

eol = char(10);
maskDisplayStr = '';
maskDisplayStr = [maskDisplayStr, 'color(''blue'');', eol, ...
    'text(0.95, 0.90, ''LINUX'', ''horizontalAlignment'', ''right'');', eol ...
    'color(''black'');', eol, ...
    'text(0.5, 0.12, ''Audio Capture'', ''horizontalAlignment'', ''center'');', eol ...
 'port_label(''output'', 1, ''Out'');', eol ...
];
        set_param(blk, 'MaskDisplay', maskDisplayStr);

%[EOF] AUDIO_CAPTURE_CALLBACK.M