• 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: DLS Synth problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DLS Synth problem


  • Subject: Re: DLS Synth problem
  • From: Edward Hynes <email@hidden>
  • Date: Tue, 17 Nov 2009 10:34:50 -0500

Hi Manual,

-50 is an 'error in the user parameter list'. Check out MacErrors.h in CarbonCore under the CoreServices Framework for a list of OSErr codes.

Regards,
Ed

On Nov 17, 2009, at 7:33 AM, Op de Coul, Manuel wrote:

Hi,

I'm trying to make a connection to the Apple DLS Synth so I
can send midi data to it. I have seen examples how to do this,
like the sources of SimpleSynth and I've read Apple's
CoreAudio documentation. I'm writing portable software and I'm not
really familiar with Macs, but I have used the midi api and
successfully created language bindings to it.
The problem might be caused by an error in the binding code,
although I've checked it thoroughly.

Using OSX 10.5.8, X11 2.4, GCC 4.4, GTK 2.18.

The call to AUGraphAddNode returns a status code of -50 all the time.
Does someone know what kind of error this number indicates?
This is basically what I'm doing:

procedure Open_DLS_Synth is
Stat : OSStatus;
Desc : aliased ComponentDescription;
Graph : aliased AUGraph;
SynthNode, OutputNode : aliased AUNode;
begin
Stat := NewAUGraph(Graph'Unchecked_Access);
if Stat /= 0 then
raise No_Success;
end if;
Desc.ComponentType := kAudioUnitType_MusicDevice; -- "aumu"
Desc.ComponentSubType := kAudioUnitSubType_DLSSynth; -- "dls "
Desc.ComponentManufacturer := kAudioUnitManufacturer_Apple; -- "appl"
Desc.ComponentFlags := 0;
Desc.ComponentFlagsMask := 0;
Stat := AUGraphAddNode(Graph, Desc'Unchecked_Access, SynthNode'Unchecked_Access);
Put_Line(OSStatus'Image(Stat));
-- This prints -50
if Stat /= 0 then
raise No_Success;
-- So exception raised here
end if;
Desc.ComponentType := kAudioUnitType_Output; -- "auou"
Desc.ComponentSubType := kAudioUnitSubType_DefaultOutput; -- "def "
Stat := AUGraphAddNode(Graph, Desc'Unchecked_Access, OutputNode'Unchecked_Access);
if Stat /= 0 then
raise No_Success;
end if;
Stat := AUGraphOpen(Graph);
if Stat /= 0 then
raise No_Success;
end if;
Stat := AUGraphConnectNodeInput(Graph, SynthNode, 0, OutputNode, 0);
if Stat /= 0 then
raise No_Success;
end if;
Stat := AUGraphInitialize(Graph);
if Stat /= 0 then
raise No_Success;
end if;
Stat := AUGraphStart(Graph);
if Stat /= 0 then
raise No_Success;
end if;
end Open_DLS_Synth;


Another question, when starting the graph, does this automatically create a midi endpoint
to the DLS synth? The documentation is not very clear about it.


Thanks in advance,

Manuel _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Coreaudio-api mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >DLS Synth problem (From: "Op de Coul, Manuel" <email@hidden>)

  • Prev by Date: Aggregate devices and clock domains question
  • Next by Date: Re: Aggregate question device
  • Previous by thread: DLS Synth problem
  • Next by thread: Re: DLS Synth problem
  • Index(es):
    • Date
    • Thread