COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 05-07-2016, 08:33 AM   #1
Tired_Joe
Human being with feelings
 
Join Date: Apr 2015
Posts: 55
Default GetGUI with AU (AudioUnit)

Hello,

I have some problems with updating a textfield if Logic does not process audio (Logic ist not running and input monitoring is disabled).

I am playing around with the AlgDisplay from the EEL Example. With VST3 there are no problems updating text when the DAW is not running.

It seems Logic only calls GetGUI() if there is audio to process. I call GetGui() in the ProcessDoubleReplacing function.

Which function can I use to update my textfields? Or can I modifiy the textfield?


Thanks



This is original AlgDisplay code from the EEL Example

Code:
class AlgDisplay : public IControl
{
public:
	AlgDisplay(IPlugBase* pPlug, IRECT pR, IText* pText, const char* str = "")
		: IControl(pPlug, pR)
	{
		mDisablePrompt = true;
		mText = *pText;
		mStr.Set(str);
	}

	~AlgDisplay() {}

	bool Draw(IGraphics* pGraphics)
	{
		return pGraphics->DrawIText(&mText, mStr.Get(), &mRECT);
	}

	void OnMouseDown(int x, int y, IMouseMod* pMod)
	{
		mPlug->GetGUI()->CreateTextEntry(this, &mText, &mRECT, mStr.Get());
	}

	void TextFromTextEntry(const char* txt)
	{
		mStr.Set(txt, MAX_ALG_LENGTH);

		//TODO: update alg

		SetDirty(false);

	}



protected:
	WDL_String mStr;
};
Tired_Joe is offline   Reply With Quote
Old 05-08-2016, 03:24 AM   #2
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,645
Default

Quote:
Originally Posted by Tired_Joe View Post
It seems Logic only calls GetGUI() if there is audio to process. I call GetGui() in the ProcessDoubleReplacing function.
I might well be wrong, but it seems to me that Logic is only calling ProcessDoubleReplacing() when there is audio to process. If so, then you will need to move your updating logic to the GUI thread, maybe use OnGUIIdle()?
Tale is offline   Reply With Quote
Old 02-19-2018, 12:07 PM   #3
Bobflip
Human being with feelings
 
Join Date: Nov 2016
Posts: 341
Default

I've got this issue rearing its head at the moment. Logic does indeed disable GUI updates if the playback is stopped and the plugin's output is silent. Was there a way found to prevent Logic from doing this?

Or alternatively, how would I move the updating logic to the GUI thread? My plugin's a visualiser, so the updating logic sends audio samples to the display controls.

I've found the tailTime property but not sure how to set this from my own plugin.

https://developer.apple.com/document...87614-tailtime
Bobflip is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:31 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.