Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] Problems using csound.hpp

Date2005-10-29 17:15
FromMichael Gogins
SubjectRe: [Cs-dev] Problems using csound.hpp
Thanks, that seemed to do the job. Probably .pyc files in old locations.

Regards,
Mike

----- Original Message ----- 
From: "Istvan Varga" 
To: 
Sent: Saturday, October 29, 2005 5:12 AM
Subject: Re: [Cs-dev] Problems using csound.hpp


> Michael Gogins wrote:
>
>> I thought I could get SWIG to produce a usable interface off csound.hpp, 
>> but the inlining doesn't appear to work. I can build _csnd.dll and import 
>> it, but the Csound class and the CppSound class derived from it simply 
>> don't appear in Python, although correct-looking wrapper code is 
>> certainly generated for them.
>>
>> Any ideas?
>>
>> At this point, when I'm less tired, I'm going to change this from inline 
>> to csound.hpp and csound.cpp.
>
> I had similar problems at first, but it seems that it had nothing
> to do with inlining. For some reason, not all files were rebuilt
> correctly (SConstruct dependencies ?), and old versions of csnd.py
> and csnd.pyc were left around. After removing all interface related
> files that are generated at compile time, and then rebuilding, I was
> able to import csnd in Python and use the Csound class (and others)
> without any problems. For example:
>
> >>> import csnd
> >>> cs=csnd.Csound()
> >>> cs.Compile('-o', 'dac', 'examples/trapped.csd')
> >>> while cs.GetScoreTime() < 10:
> ...     n=cs.PerformBuffer()
> ...
> >>> cs.Reset()
>
> So, the inline functions are fine, there is no need to replace them.
> Just do a clean rebuild of the wrapper interface and it should work.
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by the JBoss Inc.
> Get Certified Today * Register for a JBoss Training Course
> Free Certification Exam for All Training Attendees Through End of 2005
> Visit http://www.jboss.com/services/certification for more information
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 





-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net