DLS Synth problem
DLS Synth problem
- Subject: DLS Synth problem
- From: "Op de Coul, Manuel" <email@hidden>
- Date: Tue, 17 Nov 2009 13:33:34 +0100
- Acceptlanguage: en-US, de-DE
- Thread-topic: DLS Synth problem
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