# Thread-safe audio ports

The AgsPort object provides you a well defined API to safe read or write data to the AgsPort. Its access is protected by mutices. All actions on ports shall happen through ::safe-read, ::safe-write, ::safe-get-property or ::safe-set-property.

AgsPort can contain various data types. But of only one type at the time. Automation happens by adjusting ports and perhaps even applying an AgsConversion. Further it contains some meta-information about plugin name and port specifier.

## Get and set values

You can achieve this by using GValue like: