Umsci
Upmix Spatial Control Interface — OCA/OCP.1 spatial audio utility
Loading...
Searching...
No Matches
DeviceController::StateChangeMessage Class Reference

Carries a State value across the thread boundary via JUCE's message queue. More...

#include <DeviceController.h>

+ Inheritance diagram for DeviceController::StateChangeMessage:
+ Collaboration diagram for DeviceController::StateChangeMessage:

Public Member Functions

 StateChangeMessage (State s)
 
 StateChangeMessage ()=default
 
virtual ~StateChangeMessage ()=default
 
void setState (State s)
 
State getState () const
 

Detailed Description

Carries a State value across the thread boundary via JUCE's message queue.

ocp1MessageReceived() runs on the JUCE IPC/socket thread. Calling setState() directly from there would invoke onStateChanged on the wrong thread. Instead, a StateChangeMessage is posted to the JUCE message thread via postMessage(), so handleMessage() invokes setState() — and therefore onStateChanged — safely on the message thread.

Definition at line 638 of file DeviceController.h.

Constructor & Destructor Documentation

◆ StateChangeMessage() [1/2]

DeviceController::StateChangeMessage::StateChangeMessage ( State  s)
inline

Definition at line 641 of file DeviceController.h.

References setState().

◆ StateChangeMessage() [2/2]

DeviceController::StateChangeMessage::StateChangeMessage ( )
default

◆ ~StateChangeMessage()

virtual DeviceController::StateChangeMessage::~StateChangeMessage ( )
virtualdefault

Member Function Documentation

◆ getState()

State DeviceController::StateChangeMessage::getState ( ) const
inline

Definition at line 646 of file DeviceController.h.

◆ setState()

void DeviceController::StateChangeMessage::setState ( State  s)
inline

Definition at line 645 of file DeviceController.h.

Referenced by StateChangeMessage().


The documentation for this class was generated from the following file: