• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Emagic VST2AU SDK and multi-output MusicDevice
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emagic VST2AU SDK and multi-output MusicDevice


  • Subject: Re: Emagic VST2AU SDK and multi-output MusicDevice
  • From: "Malcolm Haylock" <email@hidden>
  • Date: Sat, 3 May 2003 03:46:41 +1000 (EST)

Thanks very much Art.

If you remove the overrides then multichannel playback works fine. However
the plugin now appears in Logic's popup as a mono, stereo and multichannel
plug. I played around trying to just get it to appear as a multichannel
plug without crashing but was unsuccessful. Do you know the fix?
Thanks,
Malcolm

> Hi Malcolm,
>
> I had this problem as well.
>
> I got around this by removing the VSTAUPlugin overrides for ValidFormat
> and GetStreamFormat.
>
> VST2AUPlugin.cpp, Line 670:
>
> const
> CAStreamBasicDescription& CVST2AUPlugin::GetStreamFormat(AudioUnitScope
> iScope, AudioUnitElement)
> {
> static CAStreamBasicDescription sDesc;
>
> sDesc.mSampleRate = m_r64Samplerate;
> sDesc.mFormatID = kAudioFormatLinearPCM;
> sDesc.mFormatFlags = (kAudioFormatFlagsNativeFloatPacked |
> kAudioFormatFlagIsNonInterleaved);
> sDesc.mBytesPerPacket = 4;
> sDesc.mFramesPerPacket = 1;
> sDesc.mBytesPerFrame = 4;
> sDesc.mChannelsPerFrame =
> (iScope==kAudioUnitScope_Input?s_pcInfo.NumInputs():s_pcInfo.NumOutputs(
> ));
> sDesc.mBitsPerChannel = 32;
>
> return sDesc;
> }
>
> This returns whatever the vst reported as its number of outputs,
> without asking the actual Element how it's currently configured. So
> you're telling Logic, "This element is set up for n channels", so Logic
> never makes the necessary call to ChangeStreamFormat. In fact, your
> Element is actually set up for stereo (more than likely... you
> shouldn't even assume that). So during render, when AUBase attempts to
> copy the 8 buffers Logic provides into the element, it goes Boom
> because there are only 2 buffers allocated in the Element.
>
> If you look at the implementation in AUBase, it does the the Right
> Thing?:
>
> AUBase.cpp, Line 1240:
>
> const CAStreamBasicDescription &
> AUBase::GetStreamFormat( AudioUnitScope inScope,
> AudioUnitElement inElement)
> {
> //#warning "aliasing of global scope format should be pushed to
> subclasses"
> AUIOElement *element;
>
> switch (inScope) {
> case kAudioUnitScope_Input:
> element = Inputs().SafeGetIOElement(inElement);
> break;
> case kAudioUnitScope_Output:
> element = Outputs().SafeGetIOElement(inElement);
> break;
> case kAudioUnitScope_Global: // global stream description is an alias
>
> for that of output 0
> element = Outputs().SafeGetIOElement(0);
> break;
> default:
> COMPONENT_THROW(kAudioUnitErr_InvalidScope);
> }
> return element->GetStreamFormat();
> }
>
> Notice that it actually queries the specified element and gets its
> current StreamFormat.
>
> Best,
>
> Art
> >>0xBA
>
>
> On Wednesday, April 30, 2003, at 04:07 AM, Malcolm Haylock wrote:
>
>> Hi everyone,
>>
>> I've sent the following message to Emagic developer support several
>> times since last November but have never received a reply. Has anyone
>> found the same problem and a workaround? Everything works fine with 2
>> outputs only.
>>
>> I'm having a problem porting a multi-out VST plugin to AU using
>> Emagic's VST2AU SDK (LPAUSDK5).
>>
>> You can duplicate the problem using the XSynth demo plugin provided in
>> the SDK. This will cause a segmentation fault as it seems Logic has
>> only allocated space for stereo outputs.
>>
>> 1) Set kNumOutputs = 8 in vstxsynth.h
>>
>> 2) Set the 'processReplacing' routine to:
>>
>> /
>> /----------------------------------------------------------------------
>> -------------------
>> void VstXSynth::processReplacing (float **inputs, float **outputs,
>> long sampleFrames)
>> {
>> float* out1 = outputs[0];
>> float* out2 = outputs[1];
>> float* out3 = outputs[2];
>> float* out4 = outputs[3];
>> float* out5 = outputs[4];
>> float* out6 = outputs[5];
>> float* out7 = outputs[6];
>> float* out8 = outputs[7];
>> while (--sampleFrames >= 0)
>> {
>> *out1++ = 0;
>> *out2++ = 0;
>> *out3++ = 0;
>> *out4++ = 0;
>> *out5++ = 0;
>> *out6++ = 0;
>> *out7++ = 0;
>> *out8++ = 0;
>> }
>> }
>>
>> Thanks,
>> Malcolm Haylock
>> _______________________________________________
>> coreaudio-api mailing list | email@hidden
>> Help/Unsubscribe/Archives:
>> http://www.lists.apple.com/mailman/listinfo/coreaudio-api
>> Do not post admin requests to the list. They will be ignored.
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: 5.1 DVD playback
  • Next by Date: DigitalCDSound
  • Previous by thread: Re: 5.1 DVD playback
  • Next by thread: Re: Emagic VST2AU SDK and multi-output MusicDevice
  • Index(es):
    • Date
    • Thread