This project has moved and is read-only. For the latest updates, please go here.

How to go to a specific position in Audio file ?

Jan 2, 2010 at 11:52 PM

Hello there !

 

My plugin gets time ( _ti ) in seconds as an input, then it tells the host ( an audio file has been loaded by the host) to go to the specified time ( _ ti ), how to make that easily ?

I read about gettimeinfo(), is there any method to help me 'setting' the time ?

Thanks..

Jan 3, 2010 at 11:10 AM
Edited Jan 3, 2010 at 6:35 PM

Try this forum for these kinds of questions

http://www.kvraudio.com/forum/viewforum.php?f=33
To my knowledge it is not possible to set the time a host uses to start playing in VST 2.4. But I think there was a deprecated method for that on the audioMaster callback called SetTime.
Jan 3, 2010 at 5:09 PM

Thanks Marc.

I found audioMasterSetTime in VST 2.0, how can I use it within my vst.net project ?

Jan 3, 2010 at 6:34 PM
Edited Jan 3, 2010 at 6:36 PM

As of version 0.8 of VST.NET (almost) all deprecated members (as of VST 2.4) are supported.

Here's a code example of how to get the deprecated members for calling the host (taken from the implementation of VstPluginBase.Resume in the framework). The Host property is the reference of the host command stub passed to the plugin during the Open call.

IVstHostCommandsDeprecated20 deprecated = Host.GetInstance<IVstHostCommandsDeprecated20>();

if (deprecated != null)
{
    deprecated.WantMidi();
}

To support deprecated members as a plugin implement the IVstPluginCommandsDeprecated20 interface (in Jacobi.Vst.Core.Deprecated) or derive your public VstPluginCommandStub class from the  StdVstPluginDeprecatedCommandStub base class and override the methods you wish to support (most of them are not implemented by this base class).

Do realize that in your specific case, SetTime might not be supported by every host.