VST 3 SDK VST 3.7
SDK for developing VST plug-in
|
SystemTime Helper class. More...
#include <systemtime.h>
Public Types | |
using | GetImplFunc = std::function< int64()> |
Public Member Functions | |
SystemTime (IComponentHandler *componentHandler) | |
SystemTime (const SystemTime &st) | |
SystemTime (SystemTime &&st) noexcept | |
SystemTime & | operator= (const SystemTime &st) |
SystemTime & | operator= (SystemTime &&st) noexcept |
int64 | get () const |
get the current system time More... | |
SystemTime Helper class.
Get the system time on the vst controller side.
If supported by the host this uses the same clock as used in the realtime audio process block. Otherwise an approximation via platform APIs is used.
This can be used to synchronize audio and visuals. As known, the audio process block is always called ealier as the audio which was generated passes the audio monitors or headphones. Depending on the audio graph this can be so long that your eyes will see the visualization (if not synchronized) earlier then your ears will hear the sound. To synchronize you need to queue your visualization data on the controller side timestamped with the time from the process block and dequed when it's time for the data to be visualized.
using GetImplFunc = std::function<int64 ()> |
SystemTime | ( | IComponentHandler * | componentHandler | ) |
SystemTime | ( | const SystemTime & | st | ) |
|
noexcept |
SystemTime & operator= | ( | const SystemTime & | st | ) |
|
noexcept |
|
inline |
get the current system time