VST 3 Interfaces VST 3.7
SDK for developing VST plug-in
Loading...
Searching...
No Matches
IStreamAttributes Class Referenceabstract

Meta attributes of a stream: Vst::IStreamAttributes. More...

#include <ivstattributes.h>

+ Inheritance diagram for IStreamAttributes:

Public Member Functions

virtual tresult getFileName (String128 name)=0
 Gets filename (without file extension) of the stream.
 
virtual IAttributeListgetAttributes ()=0
 Gets meta information list.
 
- Public Member Functions inherited from FUnknown
virtual tresult queryInterface (const TUID _iid, void **obj)=0
 
virtual uint32 addRef ()=0
 
virtual uint32 release ()=0
 

Static Public Attributes

static const FUID iid
 
- Static Public Attributes inherited from FUnknown
static const FUID iid
 

Detailed Description

Meta attributes of a stream: Vst::IStreamAttributes.

  • [host imp]
  • [extends IBStream]
  • [released: 3.6.0]
  • [optional]

Interface to access preset meta information from stream, for example used in setState\getState in order to inform the plug-in about the current context in which the preset loading\saving occurs (Project context or Preset load\save (see StateType)) or used to get the full file path of the loaded preset (if available).

//------------------------------------------------------------------------
...
tresult PLUGIN_API MyPlugin::setState (IBStream* state)
{
if (stream)
{
if (IAttributeList* list = stream->getAttributes ())
{
// get the current type (project/Default..) of this state
String128 string;
if (list->getString (PresetAttributes::kStateType, string, 128 * sizeof (TChar)) ==
{
UString128 tmp (string);
char ascii[128];
tmp.toAscii (ascii, 128);
if (strncmp (ascii, StateType::kProject, strlen (StateType::kProject)) == 0)
{
// we are in project loading context...
}
}
// get the full file path of this state
TChar fullPath[1024];
if (list->getString (PresetAttributes::kFilePathStringType, fullPath,
1024 * sizeof (TChar)) == kResultTrue)
{
// here we have the full path ...
}
}
}
//...read the state here.....
return kResultTrue;
}
Attribute list used in IMessage and IStreamAttributes: Vst::IAttributeList.
Definition ivstattributes.h:41
const CString kFilePathStringType
Full file path string (if available) where the preset comes from (be sure to use a bigger string when...
Definition vstpresetkeys.h:41
const CString kStateType
Type of the given state see StateType : Project / Default Preset or Normal Preset.
Definition vstpresetkeys.h:40
const CString kProject
the state is restored from a project loading or it is saved in a project
Definition vstpresetkeys.h:57
TChar String128[128]
128 character UTF-16 string
Definition vsttypes.h:77
char16 TChar
UTF-16 character.
Definition vsttypes.h:76
UStringBuffer< 128 > UString128

Member Function Documentation

◆ getFileName()

virtual tresult getFileName ( String128 name)
pure virtual

Gets filename (without file extension) of the stream.

◆ getAttributes()

virtual IAttributeList * getAttributes ( )
pure virtual

Gets meta information list.

Member Data Documentation

◆ iid

const FUID iid
static
Empty

Copyright © Steinberg Media Technologies GmbH. All Rights Reserved. This documentation is under this license.