| Looking at the OSC code, OSCinit does not have a deinit callback
(but OSClisten does). I never programmed liblo, but I expect
lo_server_thread_stop() needs to be called to free the port. I
don't think it is called.
John's your expert here, he should be able to answer this one.
Victor
----- Original Message -----
From: "victor"
To:
Sent: Tuesday, October 07, 2008 9:50 PM
Subject: [Csnd] Re: use of OSC with csound API
> Looks like the opcode requires a deinit callback (a destructor), which
> it doesn't have, to free the port. Or does it? Perhaps we should discuss
> this in the
> developer's list.
>
> Victor
> ----- Original Message -----
> From: "jean-pierre lemoine"
> To:
> Sent: Tuesday, October 07, 2008 8:11 PM
> Subject: [Csnd] use of OSC with csound API
>
>
>>I am implemented OSC support in AVSynthesis. but I have a problem
>> with reusing the csound instance (windows platform, csound double)
>>
>> I start a thread which executes in its loop
>> cs.Perform();
>> cs.Cleanup();
>> cs.Reset();
>>
>> When I stop the csound execution from the main thread, csound stops,
>> and the cleanup , reset are done.
>> If I launch a new thread with the same csound instance, i get the
>> following error message and a trap
>> OSC server error 9904 in path (null): cannot find free port
>>
>> The trap
>> #
>> # An unexpected error has been detected by Java Runtime Environment:
>> #
>> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x2fc75321, pid=2444,
>> tid=3524
>> #
>> # Java VM: Java HotSpot(TM) Client VM (10.0-b19 mixed mode, sharing
>> windows-x86)
>> # Problematic frame:
>> # C [lo.dll+0x5321]
>> #
>>
>> It seems that the OSC resources are not released during cleanup and
>> reset. Do I need to do something specific?
>>
>> In the csd I have
>> giOSChandle OSCinit 7770
>>
>> and
>>
>> instr 1
>> kreadOSC init 0
>> kosc OSClisten giOSChandle, "/AVS/layer1", "f", kreadOSC
>> if (kosc == 0) goto exl1
>> gkchLayer1 = kreadOSC
>> printk .1, gkchLayer1
>> exl1:
>> kosc OSClisten giOSChandle, "/AVS/layer2", "f", kreadOSC
>> if (kosc == 0) goto exl2
>> gkchLayer2 = kreadOSC
>> exl2:
>> kosc OSClisten giOSChandle, "/AVS/layer3", "f", kreadOSC
>> if (kosc == 0) goto exl3
>> gkchLayer3 = kreadOSC
>> exl3:
>> kosc OSClisten giOSChandle, "/AVS/layer4", "f", kreadOSC
>> if (kosc == 0) goto exl4
>> gkchLayer4 = kreadOSC
>> exl4:
>> kosc OSClisten giOSChandle, "/AVS/layer5", "f", kreadOSC
>> if (kosc == 0) goto exl5
>> gkchLayer5 = kreadOSC
>> exl5:
>> kosc OSClisten giOSChandle, "/AVS/layer6", "f", kreadOSC
>> if (kosc == 0) goto exl6
>> gkchLayer6 = kreadOSC
>> exl6:
>> kosc OSClisten giOSChandle, "/AVS/layer7", "f", kreadOSC
>> if (kosc == 0) goto exl7
>> gkchLayer7 = kreadOSC
>> exl7:
>> kosc OSClisten giOSChandle, "/AVS/layer8", "f", kreadOSC
>> if (kosc == 0) goto exl8
>> gkchLayer8 = kreadOSC
>> exl8:
>> endin
>>
>> Thanks for any help
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
|