cleanup after performance

View: New views
20 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 | Next >

cleanup after performance

by Victor Lazzarini :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Regarding the latest issues with Qutecsound, I noticed these changes  
(I don't
know when, but...). The command-line frontend finishes with different  
messages
now:

Score finished in csoundPerform().
inactive allocs returned to freespace
end of score.   overall amps:  0.49919
           overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 0.496s, CPU: 0.275s
13781 128-byte soundblks of shorts written to /Users/victor/audio/
test.aif (AIFF)
signalflowgraph: CsoundModuleDestroy(0xdc000)

The last line I guess comes from Mike's new opcodes. But missing from  
these messages are
the three 'removed temporary file ... ' messages. Does this mean  
anything?
Has anything changed in the Csound cleanup process?

Victor




------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel

Re: cleanup after performance

by Michael Gogins-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

There was an atexit handler on Windows that I removed. That could be
related. It was causing crashes in QuteCsound and other environments,
and in my tests I didn't see any bad effects from not using the atexit
handler, probably because I don't usually use temporary files.

Regards,
Mike

On 10/15/09, Victor Lazzarini <Victor.Lazzarini@...> wrote:

> Regarding the latest issues with Qutecsound, I noticed these changes
> (I don't
> know when, but...). The command-line frontend finishes with different
> messages
> now:
>
> Score finished in csoundPerform().
> inactive allocs returned to freespace
> end of score.   overall amps:  0.49919
>   overall samples out of range:        0
> 0 errors in performance
> Elapsed time at end of performance: real: 0.496s, CPU: 0.275s
> 13781 128-byte soundblks of shorts written to /Users/victor/audio/
> test.aif (AIFF)
> signalflowgraph: CsoundModuleDestroy(0xdc000)
>
> The last line I guess comes from Mike's new opcodes. But missing from
> these messages are
> the three 'removed temporary file ... ' messages. Does this mean
> anything?
> Has anything changed in the Csound cleanup process?
>
> Victor
>
>
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@...
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>


--
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel

Re: cleanup after performance

by Victor Lazzarini :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Was the atexit() handler only used on Windows or on other systems
too?

Victor
On 15 Oct 2009, at 15:52, Michael Gogins wrote:

> There was an atexit handler on Windows that I removed. That could be
> related. It was causing crashes in QuteCsound and other environments,
> and in my tests I didn't see any bad effects from not using the atexit
> handler, probably because I don't usually use temporary files.
>
> Regards,
> Mike
>
> On 10/15/09, Victor Lazzarini <Victor.Lazzarini@...> wrote:
>> Regarding the latest issues with Qutecsound, I noticed these changes
>> (I don't
>> know when, but...). The command-line frontend finishes with different
>> messages
>> now:
>>
>> Score finished in csoundPerform().
>> inactive allocs returned to freespace
>> end of score.   overall amps:  0.49919
>>   overall samples out of range:        0
>> 0 errors in performance
>> Elapsed time at end of performance: real: 0.496s, CPU: 0.275s
>> 13781 128-byte soundblks of shorts written to /Users/victor/audio/
>> test.aif (AIFF)
>> signalflowgraph: CsoundModuleDestroy(0xdc000)
>>
>> The last line I guess comes from Mike's new opcodes. But missing from
>> these messages are
>> the three 'removed temporary file ... ' messages. Does this mean
>> anything?
>> Has anything changed in the Csound cleanup process?
>>
>> Victor
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart  
>> your
>> developing skills, take BlackBerry mobile applications to market  
>> and stay
>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> http://p.sf.net/sfu/devconference
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@...
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>
>
> --
> Michael Gogins
> Irreducible Productions
> http://www.michael-gogins.com
> Michael dot Gogins at gmail dot com
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart  
> your
> developing skills, take BlackBerry mobile applications to market and  
> stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@...
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel

Re: cleanup after performance

by Michael Gogins-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It was used on all systems. I took it out only for Windows.

Regards,
Mike

On 10/15/09, Victor Lazzarini <Victor.Lazzarini@...> wrote:

> Was the atexit() handler only used on Windows or on other systems
> too?
>
> Victor
> On 15 Oct 2009, at 15:52, Michael Gogins wrote:
>
>> There was an atexit handler on Windows that I removed. That could be
>> related. It was causing crashes in QuteCsound and other environments,
>> and in my tests I didn't see any bad effects from not using the atexit
>> handler, probably because I don't usually use temporary files.
>>
>> Regards,
>> Mike
>>
>> On 10/15/09, Victor Lazzarini <Victor.Lazzarini@...> wrote:
>>> Regarding the latest issues with Qutecsound, I noticed these changes
>>> (I don't
>>> know when, but...). The command-line frontend finishes with different
>>> messages
>>> now:
>>>
>>> Score finished in csoundPerform().
>>> inactive allocs returned to freespace
>>> end of score.   overall amps:  0.49919
>>>   overall samples out of range:        0
>>> 0 errors in performance
>>> Elapsed time at end of performance: real: 0.496s, CPU: 0.275s
>>> 13781 128-byte soundblks of shorts written to /Users/victor/audio/
>>> test.aif (AIFF)
>>> signalflowgraph: CsoundModuleDestroy(0xdc000)
>>>
>>> The last line I guess comes from Mike's new opcodes. But missing from
>>> these messages are
>>> the three 'removed temporary file ... ' messages. Does this mean
>>> anything?
>>> Has anything changed in the Csound cleanup process?
>>>
>>> Victor
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>>> is the only developer event you need to attend this year. Jumpstart
>>> your
>>> developing skills, take BlackBerry mobile applications to market
>>> and stay
>>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>>> http://p.sf.net/sfu/devconference
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@...
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>
>>
>> --
>> Michael Gogins
>> Irreducible Productions
>> http://www.michael-gogins.com
>> Michael dot Gogins at gmail dot com
>>
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart
>> your
>> developing skills, take BlackBerry mobile applications to market and
>> stay
>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> http://p.sf.net/sfu/devconference
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@...
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@...
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>


--
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel

Re: cleanup after performance

by Victor Lazzarini :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

OK, so what I am reporting is not related to this, because it is on
OSX. I am not sure even if it's a problem, but it's something
that changed in Csound.

Victor
----- Original Message -----
From: "Michael Gogins" <michael.gogins@...>
To: "Developer discussions" <csound-devel@...>
Sent: Thursday, October 15, 2009 5:47 PM
Subject: Re: [Cs-dev] cleanup after performance


> It was used on all systems. I took it out only for Windows.
>
> Regards,
> Mike
>
> On 10/15/09, Victor Lazzarini <Victor.Lazzarini@...> wrote:
>> Was the atexit() handler only used on Windows or on other systems
>> too?
>>
>> Victor
>> On 15 Oct 2009, at 15:52, Michael Gogins wrote:
>>
>>> There was an atexit handler on Windows that I removed. That could be
>>> related. It was causing crashes in QuteCsound and other environments,
>>> and in my tests I didn't see any bad effects from not using the atexit
>>> handler, probably because I don't usually use temporary files.
>>>
>>> Regards,
>>> Mike
>>>
>>> On 10/15/09, Victor Lazzarini <Victor.Lazzarini@...> wrote:
>>>> Regarding the latest issues with Qutecsound, I noticed these changes
>>>> (I don't
>>>> know when, but...). The command-line frontend finishes with different
>>>> messages
>>>> now:
>>>>
>>>> Score finished in csoundPerform().
>>>> inactive allocs returned to freespace
>>>> end of score.    overall amps:  0.49919
>>>>    overall samples out of range:        0
>>>> 0 errors in performance
>>>> Elapsed time at end of performance: real: 0.496s, CPU: 0.275s
>>>> 13781 128-byte soundblks of shorts written to /Users/victor/audio/
>>>> test.aif (AIFF)
>>>> signalflowgraph: CsoundModuleDestroy(0xdc000)
>>>>
>>>> The last line I guess comes from Mike's new opcodes. But missing from
>>>> these messages are
>>>> the three 'removed temporary file ... ' messages. Does this mean
>>>> anything?
>>>> Has anything changed in the Csound cleanup process?
>>>>
>>>> Victor
>>>>
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>>>> is the only developer event you need to attend this year. Jumpstart
>>>> your
>>>> developing skills, take BlackBerry mobile applications to market
>>>> and stay
>>>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>>>> http://p.sf.net/sfu/devconference
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@...
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>
>>>
>>>
>>> --
>>> Michael Gogins
>>> Irreducible Productions
>>> http://www.michael-gogins.com
>>> Michael dot Gogins at gmail dot com
>>>
>>> ------------------------------------------------------------------------------
>>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>>> is the only developer event you need to attend this year. Jumpstart
>>> your
>>> developing skills, take BlackBerry mobile applications to market and
>>> stay
>>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>>> http://p.sf.net/sfu/devconference
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@...
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart your
>> developing skills, take BlackBerry mobile applications to market and stay
>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> http://p.sf.net/sfu/devconference
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@...
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>
>
> --
> Michael Gogins
> Irreducible Productions
> http://www.michael-gogins.com
> Michael dot Gogins at gmail dot com
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@...
> https://lists.sourceforge.net/lists/listinfo/csound-devel 


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel

Re: cleanup after performance

by Andres Cabrera :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I've finally found the reason for the crashing of QuteCsound, but I'm
not really sure where it's coming from.
It would seem that the thread which runs csound is getting called again
and again, after it has joined and csound has stopped. I'm not really
sure how this can be fixed, but hopefully someone here will know.
The thread function is in file qutecsound.cpp line 3145. I'm not
currently using CsPerfThread as I couldn't get the score messages to be
sent correctly using it, so I create my own thread in qutecsound.cpp
line 994, which is part of the runCsound() method.

Aparently, when the thread stops by itself (i.e. Csound score ends), the
thread keeps calling itself again and again, while if it's forced to
stop by the stop button, it will stop properly.

I added some debugging messages in svn. Also changed the return value of
the thread function to 1 to see if there was any change. (BTW what
should the thread function return on success?)

Does anyone know what's going on here?

Cheers,
Andrés

El jue, 15-10-2009 a las 23:01 +0100, victor escribió:

> OK, so what I am reporting is not related to this, because it is on
> OSX. I am not sure even if it's a problem, but it's something
> that changed in Csound.
>
> Victor
> ----- Original Message -----
> From: "Michael Gogins" <michael.gogins@...>
> To: "Developer discussions" <csound-devel@...>
> Sent: Thursday, October 15, 2009 5:47 PM
> Subject: Re: [Cs-dev] cleanup after performance
>
>
> > It was used on all systems. I took it out only for Windows.
> >
> > Regards,
> > Mike
> >
> > On 10/15/09, Victor Lazzarini <Victor.Lazzarini@...> wrote:
> >> Was the atexit() handler only used on Windows or on other systems
> >> too?
> >>
> >> Victor
> >> On 15 Oct 2009, at 15:52, Michael Gogins wrote:
> >>
> >>> There was an atexit handler on Windows that I removed. That could be
> >>> related. It was causing crashes in QuteCsound and other environments,
> >>> and in my tests I didn't see any bad effects from not using the atexit
> >>> handler, probably because I don't usually use temporary files.
> >>>
> >>> Regards,
> >>> Mike
> >>>
> >>> On 10/15/09, Victor Lazzarini <Victor.Lazzarini@...> wrote:
> >>>> Regarding the latest issues with Qutecsound, I noticed these changes
> >>>> (I don't
> >>>> know when, but...). The command-line frontend finishes with different
> >>>> messages
> >>>> now:
> >>>>
> >>>> Score finished in csoundPerform().
> >>>> inactive allocs returned to freespace
> >>>> end of score.    overall amps:  0.49919
> >>>>    overall samples out of range:        0
> >>>> 0 errors in performance
> >>>> Elapsed time at end of performance: real: 0.496s, CPU: 0.275s
> >>>> 13781 128-byte soundblks of shorts written to /Users/victor/audio/
> >>>> test.aif (AIFF)
> >>>> signalflowgraph: CsoundModuleDestroy(0xdc000)
> >>>>
> >>>> The last line I guess comes from Mike's new opcodes. But missing from
> >>>> these messages are
> >>>> the three 'removed temporary file ... ' messages. Does this mean
> >>>> anything?
> >>>> Has anything changed in the Csound cleanup process?
> >>>>
> >>>> Victor
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> ------------------------------------------------------------------------------
> >>>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> >>>> is the only developer event you need to attend this year. Jumpstart
> >>>> your
> >>>> developing skills, take BlackBerry mobile applications to market
> >>>> and stay
> >>>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> >>>> http://p.sf.net/sfu/devconference
> >>>> _______________________________________________
> >>>> Csound-devel mailing list
> >>>> Csound-devel@...
> >>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> >>>>
> >>>
> >>>
> >>> --
> >>> Michael Gogins
> >>> Irreducible Productions
> >>> http://www.michael-gogins.com
> >>> Michael dot Gogins at gmail dot com
> >>>
> >>> ------------------------------------------------------------------------------
> >>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> >>> is the only developer event you need to attend this year. Jumpstart
> >>> your
> >>> developing skills, take BlackBerry mobile applications to market and
> >>> stay
> >>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> >>> http://p.sf.net/sfu/devconference
> >>> _______________________________________________
> >>> Csound-devel mailing list
> >>> Csound-devel@...
> >>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> >>
> >>
> >> ------------------------------------------------------------------------------
> >> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> >> is the only developer event you need to attend this year. Jumpstart your
> >> developing skills, take BlackBerry mobile applications to market and stay
> >> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> >> http://p.sf.net/sfu/devconference
> >> _______________________________________________
> >> Csound-devel mailing list
> >> Csound-devel@...
> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
> >>
> >
> >
> > --
> > Michael Gogins
> > Irreducible Productions
> > http://www.michael-gogins.com
> > Michael dot Gogins at gmail dot com
> >
> > ------------------------------------------------------------------------------
> > Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> > is the only developer event you need to attend this year. Jumpstart your
> > developing skills, take BlackBerry mobile applications to market and stay
> > ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> > http://p.sf.net/sfu/devconference
> > _______________________________________________
> > Csound-devel mailing list
> > Csound-devel@...
> > https://lists.sourceforge.net/lists/listinfo/csound-devel 
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@...
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel

Re: cleanup after performance

by RoryWalsh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I sent my previous message before reading this one Andres, sounds like
you know where the problem is now. Once csoundPerformKsmps() reaches
the end of the score your thread should stop, I don't know why it's
being called again? Perhaps one of the other developers can spot the
problem..

2009/10/16 Andrés Cabrera <mantaraya36@...>:

> Hi,
>
> I've finally found the reason for the crashing of QuteCsound, but I'm
> not really sure where it's coming from.
> It would seem that the thread which runs csound is getting called again
> and again, after it has joined and csound has stopped. I'm not really
> sure how this can be fixed, but hopefully someone here will know.
> The thread function is in file qutecsound.cpp line 3145. I'm not
> currently using CsPerfThread as I couldn't get the score messages to be
> sent correctly using it, so I create my own thread in qutecsound.cpp
> line 994, which is part of the runCsound() method.
>
> Aparently, when the thread stops by itself (i.e. Csound score ends), the
> thread keeps calling itself again and again, while if it's forced to
> stop by the stop button, it will stop properly.
>
> I added some debugging messages in svn. Also changed the return value of
> the thread function to 1 to see if there was any change. (BTW what
> should the thread function return on success?)
>
> Does anyone know what's going on here?
>
> Cheers,
> Andrés
>
> El jue, 15-10-2009 a las 23:01 +0100, victor escribió:
>> OK, so what I am reporting is not related to this, because it is on
>> OSX. I am not sure even if it's a problem, but it's something
>> that changed in Csound.
>>
>> Victor
>> ----- Original Message -----
>> From: "Michael Gogins" <michael.gogins@...>
>> To: "Developer discussions" <csound-devel@...>
>> Sent: Thursday, October 15, 2009 5:47 PM
>> Subject: Re: [Cs-dev] cleanup after performance
>>
>>
>> > It was used on all systems. I took it out only for Windows.
>> >
>> > Regards,
>> > Mike
>> >
>> > On 10/15/09, Victor Lazzarini <Victor.Lazzarini@...> wrote:
>> >> Was the atexit() handler only used on Windows or on other systems
>> >> too?
>> >>
>> >> Victor
>> >> On 15 Oct 2009, at 15:52, Michael Gogins wrote:
>> >>
>> >>> There was an atexit handler on Windows that I removed. That could be
>> >>> related. It was causing crashes in QuteCsound and other environments,
>> >>> and in my tests I didn't see any bad effects from not using the atexit
>> >>> handler, probably because I don't usually use temporary files.
>> >>>
>> >>> Regards,
>> >>> Mike
>> >>>
>> >>> On 10/15/09, Victor Lazzarini <Victor.Lazzarini@...> wrote:
>> >>>> Regarding the latest issues with Qutecsound, I noticed these changes
>> >>>> (I don't
>> >>>> know when, but...). The command-line frontend finishes with different
>> >>>> messages
>> >>>> now:
>> >>>>
>> >>>> Score finished in csoundPerform().
>> >>>> inactive allocs returned to freespace
>> >>>> end of score.    overall amps:  0.49919
>> >>>>    overall samples out of range:        0
>> >>>> 0 errors in performance
>> >>>> Elapsed time at end of performance: real: 0.496s, CPU: 0.275s
>> >>>> 13781 128-byte soundblks of shorts written to /Users/victor/audio/
>> >>>> test.aif (AIFF)
>> >>>> signalflowgraph: CsoundModuleDestroy(0xdc000)
>> >>>>
>> >>>> The last line I guess comes from Mike's new opcodes. But missing from
>> >>>> these messages are
>> >>>> the three 'removed temporary file ... ' messages. Does this mean
>> >>>> anything?
>> >>>> Has anything changed in the Csound cleanup process?
>> >>>>
>> >>>> Victor
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>> ------------------------------------------------------------------------------
>> >>>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> >>>> is the only developer event you need to attend this year. Jumpstart
>> >>>> your
>> >>>> developing skills, take BlackBerry mobile applications to market
>> >>>> and stay
>> >>>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> >>>> http://p.sf.net/sfu/devconference
>> >>>> _______________________________________________
>> >>>> Csound-devel mailing list
>> >>>> Csound-devel@...
>> >>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>>>
>> >>>
>> >>>
>> >>> --
>> >>> Michael Gogins
>> >>> Irreducible Productions
>> >>> http://www.michael-gogins.com
>> >>> Michael dot Gogins at gmail dot com
>> >>>
>> >>> ------------------------------------------------------------------------------
>> >>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> >>> is the only developer event you need to attend this year. Jumpstart
>> >>> your
>> >>> developing skills, take BlackBerry mobile applications to market and
>> >>> stay
>> >>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> >>> http://p.sf.net/sfu/devconference
>> >>> _______________________________________________
>> >>> Csound-devel mailing list
>> >>> Csound-devel@...
>> >>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> >> is the only developer event you need to attend this year. Jumpstart your
>> >> developing skills, take BlackBerry mobile applications to market and stay
>> >> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> >> http://p.sf.net/sfu/devconference
>> >> _______________________________________________
>> >> Csound-devel mailing list
>> >> Csound-devel@...
>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >
>> >
>> > --
>> > Michael Gogins
>> > Irreducible Productions
>> > http://www.michael-gogins.com
>> > Michael dot Gogins at gmail dot com
>> >
>> > ------------------------------------------------------------------------------
>> > Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> > is the only developer event you need to attend this year. Jumpstart your
>> > developing skills, take BlackBerry mobile applications to market and stay
>> > ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> > http://p.sf.net/sfu/devconference
>> > _______________________________________________
>> > Csound-devel mailing list
>> > Csound-devel@...
>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart your
>> developing skills, take BlackBerry mobile applications to market and stay
>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> http://p.sf.net/sfu/devconference
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@...
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@...
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel

Re: cleanup after performance

by Michael Gogins-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This is what happens when you don't use the CsPerfThread.

What problem did you experience using CsPerfThread's own method for
sending in events?

Regards,
Mike

On 10/16/09, Andrés Cabrera <mantaraya36@...> wrote:

> Hi,
>
> I've finally found the reason for the crashing of QuteCsound, but I'm
> not really sure where it's coming from.
> It would seem that the thread which runs csound is getting called again
> and again, after it has joined and csound has stopped. I'm not really
> sure how this can be fixed, but hopefully someone here will know.
> The thread function is in file qutecsound.cpp line 3145. I'm not
> currently using CsPerfThread as I couldn't get the score messages to be
> sent correctly using it, so I create my own thread in qutecsound.cpp
> line 994, which is part of the runCsound() method.
>
> Aparently, when the thread stops by itself (i.e. Csound score ends), the
> thread keeps calling itself again and again, while if it's forced to
> stop by the stop button, it will stop properly.
>
> I added some debugging messages in svn. Also changed the return value of
> the thread function to 1 to see if there was any change. (BTW what
> should the thread function return on success?)
>
> Does anyone know what's going on here?
>
> Cheers,
> Andrés
>
> El jue, 15-10-2009 a las 23:01 +0100, victor escribió:
>> OK, so what I am reporting is not related to this, because it is on
>> OSX. I am not sure even if it's a problem, but it's something
>> that changed in Csound.
>>
>> Victor
>> ----- Original Message -----
>> From: "Michael Gogins" <michael.gogins@...>
>> To: "Developer discussions" <csound-devel@...>
>> Sent: Thursday, October 15, 2009 5:47 PM
>> Subject: Re: [Cs-dev] cleanup after performance
>>
>>
>> > It was used on all systems. I took it out only for Windows.
>> >
>> > Regards,
>> > Mike
>> >
>> > On 10/15/09, Victor Lazzarini <Victor.Lazzarini@...> wrote:
>> >> Was the atexit() handler only used on Windows or on other systems
>> >> too?
>> >>
>> >> Victor
>> >> On 15 Oct 2009, at 15:52, Michael Gogins wrote:
>> >>
>> >>> There was an atexit handler on Windows that I removed. That could be
>> >>> related. It was causing crashes in QuteCsound and other environments,
>> >>> and in my tests I didn't see any bad effects from not using the atexit
>> >>> handler, probably because I don't usually use temporary files.
>> >>>
>> >>> Regards,
>> >>> Mike
>> >>>
>> >>> On 10/15/09, Victor Lazzarini <Victor.Lazzarini@...> wrote:
>> >>>> Regarding the latest issues with Qutecsound, I noticed these changes
>> >>>> (I don't
>> >>>> know when, but...). The command-line frontend finishes with different
>> >>>> messages
>> >>>> now:
>> >>>>
>> >>>> Score finished in csoundPerform().
>> >>>> inactive allocs returned to freespace
>> >>>> end of score.    overall amps:  0.49919
>> >>>>    overall samples out of range:        0
>> >>>> 0 errors in performance
>> >>>> Elapsed time at end of performance: real: 0.496s, CPU: 0.275s
>> >>>> 13781 128-byte soundblks of shorts written to /Users/victor/audio/
>> >>>> test.aif (AIFF)
>> >>>> signalflowgraph: CsoundModuleDestroy(0xdc000)
>> >>>>
>> >>>> The last line I guess comes from Mike's new opcodes. But missing from
>> >>>> these messages are
>> >>>> the three 'removed temporary file ... ' messages. Does this mean
>> >>>> anything?
>> >>>> Has anything changed in the Csound cleanup process?
>> >>>>
>> >>>> Victor
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>> ------------------------------------------------------------------------------
>> >>>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> >>>> is the only developer event you need to attend this year. Jumpstart
>> >>>> your
>> >>>> developing skills, take BlackBerry mobile applications to market
>> >>>> and stay
>> >>>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> >>>> http://p.sf.net/sfu/devconference
>> >>>> _______________________________________________
>> >>>> Csound-devel mailing list
>> >>>> Csound-devel@...
>> >>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>>>
>> >>>
>> >>>
>> >>> --
>> >>> Michael Gogins
>> >>> Irreducible Productions
>> >>> http://www.michael-gogins.com
>> >>> Michael dot Gogins at gmail dot com
>> >>>
>> >>> ------------------------------------------------------------------------------
>> >>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> >>> is the only developer event you need to attend this year. Jumpstart
>> >>> your
>> >>> developing skills, take BlackBerry mobile applications to market and
>> >>> stay
>> >>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> >>> http://p.sf.net/sfu/devconference
>> >>> _______________________________________________
>> >>> Csound-devel mailing list
>> >>> Csound-devel@...
>> >>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> >> is the only developer event you need to attend this year. Jumpstart
>> >> your
>> >> developing skills, take BlackBerry mobile applications to market and
>> >> stay
>> >> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> >> http://p.sf.net/sfu/devconference
>> >> _______________________________________________
>> >> Csound-devel mailing list
>> >> Csound-devel@...
>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >
>> >
>> > --
>> > Michael Gogins
>> > Irreducible Productions
>> > http://www.michael-gogins.com
>> > Michael dot Gogins at gmail dot com
>> >
>> > ------------------------------------------------------------------------------
>> > Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> > is the only developer event you need to attend this year. Jumpstart your
>> > developing skills, take BlackBerry mobile applications to market and
>> > stay
>> > ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> > http://p.sf.net/sfu/devconference
>> > _______________________________________________
>> > Csound-devel mailing list
>> > Csound-devel@...
>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart your
>> developing skills, take BlackBerry mobile applications to market and stay
>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> http://p.sf.net/sfu/devconference
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@...
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@...
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>


--
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel

Re: cleanup after performance

by Andres Cabrera :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Michael,

Now that I check I am actually using CsPerfThread, I have it ifdef'd
and defined by default in the build script, so I missed it. I was
having problem with sending score events using the function provided
by CsPerfThread, but that's working fine now.

The cleanup problem is still there, though, even if I create my own
thread (don't define QUTECSOUND_USE_CSOUNDPERFORMANCETHREAD in
src.pro)

I'm not really sure whether it's my fault, but I don't think anything
in QuteCsound has changed in that respect. Maybe Steven or a blue user
can chime in to confirm things are fine with the new csound?

Cheers,
Andrés

On Fri, Oct 16, 2009 at 2:46 PM, Michael Gogins
<michael.gogins@...> wrote:

> This is what happens when you don't use the CsPerfThread.
>
> What problem did you experience using CsPerfThread's own method for
> sending in events?
>
> Regards,
> Mike
>
> On 10/16/09, Andrés Cabrera <mantaraya36@...> wrote:
>> Hi,
>>
>> I've finally found the reason for the crashing of QuteCsound, but I'm
>> not really sure where it's coming from.
>> It would seem that the thread which runs csound is getting called again
>> and again, after it has joined and csound has stopped. I'm not really
>> sure how this can be fixed, but hopefully someone here will know.
>> The thread function is in file qutecsound.cpp line 3145. I'm not
>> currently using CsPerfThread as I couldn't get the score messages to be
>> sent correctly using it, so I create my own thread in qutecsound.cpp
>> line 994, which is part of the runCsound() method.
>>
>> Aparently, when the thread stops by itself (i.e. Csound score ends), the
>> thread keeps calling itself again and again, while if it's forced to
>> stop by the stop button, it will stop properly.
>>
>> I added some debugging messages in svn. Also changed the return value of
>> the thread function to 1 to see if there was any change. (BTW what
>> should the thread function return on success?)
>>
>> Does anyone know what's going on here?
>>
>> Cheers,
>> Andrés
>>
>> El jue, 15-10-2009 a las 23:01 +0100, victor escribió:
>>> OK, so what I am reporting is not related to this, because it is on
>>> OSX. I am not sure even if it's a problem, but it's something
>>> that changed in Csound.
>>>
>>> Victor
>>> ----- Original Message -----
>>> From: "Michael Gogins" <michael.gogins@...>
>>> To: "Developer discussions" <csound-devel@...>
>>> Sent: Thursday, October 15, 2009 5:47 PM
>>> Subject: Re: [Cs-dev] cleanup after performance
>>>
>>>
>>> > It was used on all systems. I took it out only for Windows.
>>> >
>>> > Regards,
>>> > Mike
>>> >
>>> > On 10/15/09, Victor Lazzarini <Victor.Lazzarini@...> wrote:
>>> >> Was the atexit() handler only used on Windows or on other systems
>>> >> too?
>>> >>
>>> >> Victor
>>> >> On 15 Oct 2009, at 15:52, Michael Gogins wrote:
>>> >>
>>> >>> There was an atexit handler on Windows that I removed. That could be
>>> >>> related. It was causing crashes in QuteCsound and other environments,
>>> >>> and in my tests I didn't see any bad effects from not using the atexit
>>> >>> handler, probably because I don't usually use temporary files.
>>> >>>
>>> >>> Regards,
>>> >>> Mike
>>> >>>
>>> >>> On 10/15/09, Victor Lazzarini <Victor.Lazzarini@...> wrote:
>>> >>>> Regarding the latest issues with Qutecsound, I noticed these changes
>>> >>>> (I don't
>>> >>>> know when, but...). The command-line frontend finishes with different
>>> >>>> messages
>>> >>>> now:
>>> >>>>
>>> >>>> Score finished in csoundPerform().
>>> >>>> inactive allocs returned to freespace
>>> >>>> end of score.    overall amps:  0.49919
>>> >>>>    overall samples out of range:        0
>>> >>>> 0 errors in performance
>>> >>>> Elapsed time at end of performance: real: 0.496s, CPU: 0.275s
>>> >>>> 13781 128-byte soundblks of shorts written to /Users/victor/audio/
>>> >>>> test.aif (AIFF)
>>> >>>> signalflowgraph: CsoundModuleDestroy(0xdc000)
>>> >>>>
>>> >>>> The last line I guess comes from Mike's new opcodes. But missing from
>>> >>>> these messages are
>>> >>>> the three 'removed temporary file ... ' messages. Does this mean
>>> >>>> anything?
>>> >>>> Has anything changed in the Csound cleanup process?
>>> >>>>
>>> >>>> Victor
>>> >>>>
>>> >>>>
>>> >>>>
>>> >>>>
>>> >>>> ------------------------------------------------------------------------------
>>> >>>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>>> >>>> is the only developer event you need to attend this year. Jumpstart
>>> >>>> your
>>> >>>> developing skills, take BlackBerry mobile applications to market
>>> >>>> and stay
>>> >>>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>>> >>>> http://p.sf.net/sfu/devconference
>>> >>>> _______________________________________________
>>> >>>> Csound-devel mailing list
>>> >>>> Csound-devel@...
>>> >>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> >>>>
>>> >>>
>>> >>>
>>> >>> --
>>> >>> Michael Gogins
>>> >>> Irreducible Productions
>>> >>> http://www.michael-gogins.com
>>> >>> Michael dot Gogins at gmail dot com
>>> >>>
>>> >>> ------------------------------------------------------------------------------
>>> >>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>>> >>> is the only developer event you need to attend this year. Jumpstart
>>> >>> your
>>> >>> developing skills, take BlackBerry mobile applications to market and
>>> >>> stay
>>> >>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>>> >>> http://p.sf.net/sfu/devconference
>>> >>> _______________________________________________
>>> >>> Csound-devel mailing list
>>> >>> Csound-devel@...
>>> >>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> >>
>>> >>
>>> >> ------------------------------------------------------------------------------
>>> >> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>>> >> is the only developer event you need to attend this year. Jumpstart
>>> >> your
>>> >> developing skills, take BlackBerry mobile applications to market and
>>> >> stay
>>> >> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>>> >> http://p.sf.net/sfu/devconference
>>> >> _______________________________________________
>>> >> Csound-devel mailing list
>>> >> Csound-devel@...
>>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> >>
>>> >
>>> >
>>> > --
>>> > Michael Gogins
>>> > Irreducible Productions
>>> > http://www.michael-gogins.com
>>> > Michael dot Gogins at gmail dot com
>>> >
>>> > ------------------------------------------------------------------------------
>>> > Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>>> > is the only developer event you need to attend this year. Jumpstart your
>>> > developing skills, take BlackBerry mobile applications to market and
>>> > stay
>>> > ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>>> > http://p.sf.net/sfu/devconference
>>> > _______________________________________________
>>> > Csound-devel mailing list
>>> > Csound-devel@...
>>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>>> is the only developer event you need to attend this year. Jumpstart your
>>> developing skills, take BlackBerry mobile applications to market and stay
>>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>>> http://p.sf.net/sfu/devconference
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@...
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart your
>> developing skills, take BlackBerry mobile applications to market and stay
>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> http://p.sf.net/sfu/devconference
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@...
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>
>
> --
> Michael Gogins
> Irreducible Productions
> http://www.michael-gogins.com
> Michael dot Gogins at gmail dot com
>



--


Andrés

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel

Re: cleanup after performance

by Victor Lazzarini :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The thing to do then, I guess, is to write a small program with a perform
thread and see if it has a similar problem to qutecsound.

Victor
----- Original Message -----
From: "Andres Cabrera" <mantaraya36@...>
To: "Michael Gogins" <michael.gogins@...>
Cc: "Developer discussions" <csound-devel@...>
Sent: Saturday, October 17, 2009 8:20 AM
Subject: Re: [Cs-dev] cleanup after performance


Hi Michael,

Now that I check I am actually using CsPerfThread, I have it ifdef'd
and defined by default in the build script, so I missed it. I was
having problem with sending score events using the function provided
by CsPerfThread, but that's working fine now.

The cleanup problem is still there, though, even if I create my own
thread (don't define QUTECSOUND_USE_CSOUNDPERFORMANCETHREAD in
src.pro)

I'm not really sure whether it's my fault, but I don't think anything
in QuteCsound has changed in that respect. Maybe Steven or a blue user
can chime in to confirm things are fine with the new csound?

Cheers,
Andrés

On Fri, Oct 16, 2009 at 2:46 PM, Michael Gogins
<michael.gogins@...> wrote:

> This is what happens when you don't use the CsPerfThread.
>
> What problem did you experience using CsPerfThread's own method for
> sending in events?
>
> Regards,
> Mike
>
> On 10/16/09, Andrés Cabrera <mantaraya36@...> wrote:
>> Hi,
>>
>> I've finally found the reason for the crashing of QuteCsound, but I'm
>> not really sure where it's coming from.
>> It would seem that the thread which runs csound is getting called again
>> and again, after it has joined and csound has stopped. I'm not really
>> sure how this can be fixed, but hopefully someone here will know.
>> The thread function is in file qutecsound.cpp line 3145. I'm not
>> currently using CsPerfThread as I couldn't get the score messages to be
>> sent correctly using it, so I create my own thread in qutecsound.cpp
>> line 994, which is part of the runCsound() method.
>>
>> Aparently, when the thread stops by itself (i.e. Csound score ends), the
>> thread keeps calling itself again and again, while if it's forced to
>> stop by the stop button, it will stop properly.
>>
>> I added some debugging messages in svn. Also changed the return value of
>> the thread function to 1 to see if there was any change. (BTW what
>> should the thread function return on success?)
>>
>> Does anyone know what's going on here?
>>
>> Cheers,
>> Andrés
>>
>> El jue, 15-10-2009 a las 23:01 +0100, victor escribió:
>>> OK, so what I am reporting is not related to this, because it is on
>>> OSX. I am not sure even if it's a problem, but it's something
>>> that changed in Csound.
>>>
>>> Victor
>>> ----- Original Message -----
>>> From: "Michael Gogins" <michael.gogins@...>
>>> To: "Developer discussions" <csound-devel@...>
>>> Sent: Thursday, October 15, 2009 5:47 PM
>>> Subject: Re: [Cs-dev] cleanup after performance
>>>
>>>
>>> > It was used on all systems. I took it out only for Windows.
>>> >
>>> > Regards,
>>> > Mike
>>> >
>>> > On 10/15/09, Victor Lazzarini <Victor.Lazzarini@...> wrote:
>>> >> Was the atexit() handler only used on Windows or on other systems
>>> >> too?
>>> >>
>>> >> Victor
>>> >> On 15 Oct 2009, at 15:52, Michael Gogins wrote:
>>> >>
>>> >>> There was an atexit handler on Windows that I removed. That could be
>>> >>> related. It was causing crashes in QuteCsound and other
>>> >>> environments,
>>> >>> and in my tests I didn't see any bad effects from not using the
>>> >>> atexit
>>> >>> handler, probably because I don't usually use temporary files.
>>> >>>
>>> >>> Regards,
>>> >>> Mike
>>> >>>
>>> >>> On 10/15/09, Victor Lazzarini <Victor.Lazzarini@...> wrote:
>>> >>>> Regarding the latest issues with Qutecsound, I noticed these
>>> >>>> changes
>>> >>>> (I don't
>>> >>>> know when, but...). The command-line frontend finishes with
>>> >>>> different
>>> >>>> messages
>>> >>>> now:
>>> >>>>
>>> >>>> Score finished in csoundPerform().
>>> >>>> inactive allocs returned to freespace
>>> >>>> end of score. overall amps: 0.49919
>>> >>>> overall samples out of range: 0
>>> >>>> 0 errors in performance
>>> >>>> Elapsed time at end of performance: real: 0.496s, CPU: 0.275s
>>> >>>> 13781 128-byte soundblks of shorts written to /Users/victor/audio/
>>> >>>> test.aif (AIFF)
>>> >>>> signalflowgraph: CsoundModuleDestroy(0xdc000)
>>> >>>>
>>> >>>> The last line I guess comes from Mike's new opcodes. But missing
>>> >>>> from
>>> >>>> these messages are
>>> >>>> the three 'removed temporary file ... ' messages. Does this mean
>>> >>>> anything?
>>> >>>> Has anything changed in the Csound cleanup process?
>>> >>>>
>>> >>>> Victor
>>> >>>>
>>> >>>>
>>> >>>>
>>> >>>>
>>> >>>> ------------------------------------------------------------------------------
>>> >>>> Come build with us! The BlackBerry(R) Developer Conference in SF,
>>> >>>> CA
>>> >>>> is the only developer event you need to attend this year. Jumpstart
>>> >>>> your
>>> >>>> developing skills, take BlackBerry mobile applications to market
>>> >>>> and stay
>>> >>>> ahead of the curve. Join us from November 9 - 12, 2009. Register
>>> >>>> now!
>>> >>>> http://p.sf.net/sfu/devconference
>>> >>>> _______________________________________________
>>> >>>> Csound-devel mailing list
>>> >>>> Csound-devel@...
>>> >>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> >>>>
>>> >>>
>>> >>>
>>> >>> --
>>> >>> Michael Gogins
>>> >>> Irreducible Productions
>>> >>> http://www.michael-gogins.com
>>> >>> Michael dot Gogins at gmail dot com
>>> >>>
>>> >>> ------------------------------------------------------------------------------
>>> >>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>>> >>> is the only developer event you need to attend this year. Jumpstart
>>> >>> your
>>> >>> developing skills, take BlackBerry mobile applications to market and
>>> >>> stay
>>> >>> ahead of the curve. Join us from November 9 - 12, 2009. Register
>>> >>> now!
>>> >>> http://p.sf.net/sfu/devconference
>>> >>> _______________________________________________
>>> >>> Csound-devel mailing list
>>> >>> Csound-devel@...
>>> >>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> >>
>>> >>
>>> >> ------------------------------------------------------------------------------
>>> >> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>>> >> is the only developer event you need to attend this year. Jumpstart
>>> >> your
>>> >> developing skills, take BlackBerry mobile applications to market and
>>> >> stay
>>> >> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>>> >> http://p.sf.net/sfu/devconference
>>> >> _______________________________________________
>>> >> Csound-devel mailing list
>>> >> Csound-devel@...
>>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> >>
>>> >
>>> >
>>> > --
>>> > Michael Gogins
>>> > Irreducible Productions
>>> > http://www.michael-gogins.com
>>> > Michael dot Gogins at gmail dot com
>>> >
>>> > ------------------------------------------------------------------------------
>>> > Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>>> > is the only developer event you need to attend this year. Jumpstart
>>> > your
>>> > developing skills, take BlackBerry mobile applications to market and
>>> > stay
>>> > ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>>> > http://p.sf.net/sfu/devconference
>>> > _______________________________________________
>>> > Csound-devel mailing list
>>> > Csound-devel@...
>>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>>> is the only developer event you need to attend this year. Jumpstart your
>>> developing skills, take BlackBerry mobile applications to market and
>>> stay
>>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>>> http://p.sf.net/sfu/devconference
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@...
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart your
>> developing skills, take BlackBerry mobile applications to market and stay
>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> http://p.sf.net/sfu/devconference
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@...
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>
>
> --
> Michael Gogins
> Irreducible Productions
> http://www.michael-gogins.com
> Michael dot Gogins at gmail dot com
>



--


Andrés

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel 


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel

Re: cleanup after performance

by Andres Cabrera :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I've made some slight changes to Rory's program, which seem to show
the API is not closing completely, however, I don't get the same
behavior I get in QuteCsound. I'll have a look.

#include <stdio.h>
#include <csound/csound.h>

//performance thread function prototype
uintptr_t csThread(void *clientData);
//userData structure declaration

typedef struct userData_ {
  int result;
  CSOUND* csound;
  int PERF_STATUS;
} userData;

//------------------------------------------------------------
int main(int argc, char *argv[])
{
  int userInput=200;
  void* ThreadID;
  userData* ud;
  ud = (userData *)malloc(sizeof(userData));
  MYFLT* pvalue;
  ud->csound=csoundCreate(NULL);
  csoundInitialize(&argc, &argv, 0);
  ud->result=csoundCompile(ud->csound,argc,argv);
  if(!ud->result)
  {
    ud->PERF_STATUS=1;
    ThreadID = csoundCreateThread(csThread, (void*)ud);
  }
  else{
    printf("csoundCompiled returned an error");
    return 0;
  }
  printf("\nEnter a pitch in Hz(0 to Exit) and type return\n");
  while(userInput!=0)
  {
    if(csoundGetChannelPtr(ud->csound, &pvalue, "pitch",
       CSOUND_INPUT_CHANNEL | CSOUND_CONTROL_CHANNEL)==0);
    *pvalue = (MYFLT)userInput;
    scanf("%d", &userInput);
  }
  ud->PERF_STATUS=0;
  return ud->result;
}
//-------------------------------------------------------------
//definition of our performance thread function
uintptr_t csThread(void *data)
{
  printf("Start thread\n");
  userData* udata = (userData*)data;
  if(!udata->result)
  {
    while((csoundPerformKsmps(udata->csound) == 0)
           &&(udata->PERF_STATUS==1));
    csoundCleanup(udata->csound);
    csoundDestroy(udata->csound);
  }
  udata->PERF_STATUS = 0;
  printf("End thread\n");
  return 1;
}
//--------------------------------------------------------------------------------------------


Cheers,
Andrés

On Sat, Oct 17, 2009 at 8:35 AM, victor <Victor.Lazzarini@...> wrote:

> The thing to do then, I guess, is to write a small program with a perform
> thread and see if it has a similar problem to qutecsound.
>
> Victor
> ----- Original Message -----
> From: "Andres Cabrera" <mantaraya36@...>
> To: "Michael Gogins" <michael.gogins@...>
> Cc: "Developer discussions" <csound-devel@...>
> Sent: Saturday, October 17, 2009 8:20 AM
> Subject: Re: [Cs-dev] cleanup after performance
>
>
> Hi Michael,
>
> Now that I check I am actually using CsPerfThread, I have it ifdef'd
> and defined by default in the build script, so I missed it. I was
> having problem with sending score events using the function provided
> by CsPerfThread, but that's working fine now.
>
> The cleanup problem is still there, though, even if I create my own
> thread (don't define QUTECSOUND_USE_CSOUNDPERFORMANCETHREAD in
> src.pro)
>
> I'm not really sure whether it's my fault, but I don't think anything
> in QuteCsound has changed in that respect. Maybe Steven or a blue user
> can chime in to confirm things are fine with the new csound?
>
> Cheers,
> Andrés
>
> On Fri, Oct 16, 2009 at 2:46 PM, Michael Gogins
> <michael.gogins@...> wrote:
>> This is what happens when you don't use the CsPerfThread.
>>
>> What problem did you experience using CsPerfThread's own method for
>> sending in events?
>>
>> Regards,
>> Mike
>>
>> On 10/16/09, Andrés Cabrera <mantaraya36@...> wrote:
>>> Hi,
>>>
>>> I've finally found the reason for the crashing of QuteCsound, but I'm
>>> not really sure where it's coming from.
>>> It would seem that the thread which runs csound is getting called again
>>> and again, after it has joined and csound has stopped. I'm not really
>>> sure how this can be fixed, but hopefully someone here will know.
>>> The thread function is in file qutecsound.cpp line 3145. I'm not
>>> currently using CsPerfThread as I couldn't get the score messages to be
>>> sent correctly using it, so I create my own thread in qutecsound.cpp
>>> line 994, which is part of the runCsound() method.
>>>
>>> Aparently, when the thread stops by itself (i.e. Csound score ends), the
>>> thread keeps calling itself again and again, while if it's forced to
>>> stop by the stop button, it will stop properly.
>>>
>>> I added some debugging messages in svn. Also changed the return value of
>>> the thread function to 1 to see if there was any change. (BTW what
>>> should the thread function return on success?)
>>>
>>> Does anyone know what's going on here?
>>>
>>> Cheers,
>>> Andrés
>>>
>>> El jue, 15-10-2009 a las 23:01 +0100, victor escribió:
>>>> OK, so what I am reporting is not related to this, because it is on
>>>> OSX. I am not sure even if it's a problem, but it's something
>>>> that changed in Csound.
>>>>
>>>> Victor
>>>> ----- Original Message -----
>>>> From: "Michael Gogins" <michael.gogins@...>
>>>> To: "Developer discussions" <csound-devel@...>
>>>> Sent: Thursday, October 15, 2009 5:47 PM
>>>> Subject: Re: [Cs-dev] cleanup after performance
>>>>
>>>>
>>>> > It was used on all systems. I took it out only for Windows.
>>>> >
>>>> > Regards,
>>>> > Mike
>>>> >
>>>> > On 10/15/09, Victor Lazzarini <Victor.Lazzarini@...> wrote:
>>>> >> Was the atexit() handler only used on Windows or on other systems
>>>> >> too?
>>>> >>
>>>> >> Victor
>>>> >> On 15 Oct 2009, at 15:52, Michael Gogins wrote:
>>>> >>
>>>> >>> There was an atexit handler on Windows that I removed. That could be
>>>> >>> related. It was causing crashes in QuteCsound and other
>>>> >>> environments,
>>>> >>> and in my tests I didn't see any bad effects from not using the
>>>> >>> atexit
>>>> >>> handler, probably because I don't usually use temporary files.
>>>> >>>
>>>> >>> Regards,
>>>> >>> Mike
>>>> >>>
>>>> >>> On 10/15/09, Victor Lazzarini <Victor.Lazzarini@...> wrote:
>>>> >>>> Regarding the latest issues with Qutecsound, I noticed these
>>>> >>>> changes
>>>> >>>> (I don't
>>>> >>>> know when, but...). The command-line frontend finishes with
>>>> >>>> different
>>>> >>>> messages
>>>> >>>> now:
>>>> >>>>
>>>> >>>> Score finished in csoundPerform().
>>>> >>>> inactive allocs returned to freespace
>>>> >>>> end of score. overall amps: 0.49919
>>>> >>>> overall samples out of range: 0
>>>> >>>> 0 errors in performance
>>>> >>>> Elapsed time at end of performance: real: 0.496s, CPU: 0.275s
>>>> >>>> 13781 128-byte soundblks of shorts written to /Users/victor/audio/
>>>> >>>> test.aif (AIFF)
>>>> >>>> signalflowgraph: CsoundModuleDestroy(0xdc000)
>>>> >>>>
>>>> >>>> The last line I guess comes from Mike's new opcodes. But missing
>>>> >>>> from
>>>> >>>> these messages are
>>>> >>>> the three 'removed temporary file ... ' messages. Does this mean
>>>> >>>> anything?
>>>> >>>> Has anything changed in the Csound cleanup process?
>>>> >>>>
>>>> >>>> Victor
>>>> >>>>
>>>> >>>>
>>>> >>>>
>>>> >>>>
>>>> >>>> ------------------------------------------------------------------------------
>>>> >>>> Come build with us! The BlackBerry(R) Developer Conference in SF,
>>>> >>>> CA
>>>> >>>> is the only developer event you need to attend this year. Jumpstart
>>>> >>>> your
>>>> >>>> developing skills, take BlackBerry mobile applications to market
>>>> >>>> and stay
>>>> >>>> ahead of the curve. Join us from November 9 - 12, 2009. Register
>>>> >>>> now!
>>>> >>>> http://p.sf.net/sfu/devconference
>>>> >>>> _______________________________________________
>>>> >>>> Csound-devel mailing list
>>>> >>>> Csound-devel@...
>>>> >>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>> >>>>
>>>> >>>
>>>> >>>
>>>> >>> --
>>>> >>> Michael Gogins
>>>> >>> Irreducible Productions
>>>> >>> http://www.michael-gogins.com
>>>> >>> Michael dot Gogins at gmail dot com
>>>> >>>
>>>> >>> ------------------------------------------------------------------------------
>>>> >>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>>>> >>> is the only developer event you need to attend this year. Jumpstart
>>>> >>> your
>>>> >>> developing skills, take BlackBerry mobile applications to market and
>>>> >>> stay
>>>> >>> ahead of the curve. Join us from November 9 - 12, 2009. Register
>>>> >>> now!
>>>> >>> http://p.sf.net/sfu/devconference
>>>> >>> _______________________________________________
>>>> >>> Csound-devel mailing list
>>>> >>> Csound-devel@...
>>>> >>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>> >>
>>>> >>
>>>> >> ------------------------------------------------------------------------------
>>>> >> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>>>> >> is the only developer event you need to attend this year. Jumpstart
>>>> >> your
>>>> >> developing skills, take BlackBerry mobile applications to market and
>>>> >> stay
>>>> >> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>>>> >> http://p.sf.net/sfu/devconference
>>>> >> _______________________________________________
>>>> >> Csound-devel mailing list
>>>> >> Csound-devel@...
>>>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>> >>
>>>> >
>>>> >
>>>> > --
>>>> > Michael Gogins
>>>> > Irreducible Productions
>>>> > http://www.michael-gogins.com
>>>> > Michael dot Gogins at gmail dot com
>>>> >
>>>> > ------------------------------------------------------------------------------
>>>> > Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>>>> > is the only developer event you need to attend this year. Jumpstart
>>>> > your
>>>> > developing skills, take BlackBerry mobile applications to market and
>>>> > stay
>>>> > ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>>>> > http://p.sf.net/sfu/devconference
>>>> > _______________________________________________
>>>> > Csound-devel mailing list
>>>> > Csound-devel@...
>>>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>>>> is the only developer event you need to attend this year. Jumpstart your
>>>> developing skills, take BlackBerry mobile applications to market and
>>>> stay
>>>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>>>> http://p.sf.net/sfu/devconference
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@...
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>>> is the only developer event you need to attend this year. Jumpstart your
>>> developing skills, take BlackBerry mobile applications to market and stay
>>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>>> http://p.sf.net/sfu/devconference
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@...
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>
>>
>> --
>> Michael Gogins
>> Irreducible Productions
>> http://www.michael-gogins.com
>> Michael dot Gogins at gmail dot com
>>
>
>
>
> --
>
>
> Andrés
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@...
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@...
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>



--


Andrés

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel

Re: cleanup after performance

by Andres Cabrera :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sorry, it's actually working fine (it's just waiting for keyboard
input)... I need to look at QuteCsound.

Cheers,
Andrés

On Sat, Oct 17, 2009 at 9:31 AM, Andres Cabrera <mantaraya36@...> wrote:

> Hi,
>
> I've made some slight changes to Rory's program, which seem to show
> the API is not closing completely, however, I don't get the same
> behavior I get in QuteCsound. I'll have a look.
>
> #include <stdio.h>
> #include <csound/csound.h>
>
> //performance thread function prototype
> uintptr_t csThread(void *clientData);
> //userData structure declaration
>
> typedef struct userData_ {
>  int result;
>  CSOUND* csound;
>  int PERF_STATUS;
> } userData;
>
> //------------------------------------------------------------
> int main(int argc, char *argv[])
> {
>  int userInput=200;
>  void* ThreadID;
>  userData* ud;
>  ud = (userData *)malloc(sizeof(userData));
>  MYFLT* pvalue;
>  ud->csound=csoundCreate(NULL);
>  csoundInitialize(&argc, &argv, 0);
>  ud->result=csoundCompile(ud->csound,argc,argv);
>  if(!ud->result)
>  {
>    ud->PERF_STATUS=1;
>    ThreadID = csoundCreateThread(csThread, (void*)ud);
>  }
>  else{
>    printf("csoundCompiled returned an error");
>    return 0;
>  }
>  printf("\nEnter a pitch in Hz(0 to Exit) and type return\n");
>  while(userInput!=0)
>  {
>    if(csoundGetChannelPtr(ud->csound, &pvalue, "pitch",
>       CSOUND_INPUT_CHANNEL | CSOUND_CONTROL_CHANNEL)==0);
>    *pvalue = (MYFLT)userInput;
>    scanf("%d", &userInput);
>  }
>  ud->PERF_STATUS=0;
>  return ud->result;
> }
> //-------------------------------------------------------------
> //definition of our performance thread function
> uintptr_t csThread(void *data)
> {
>  printf("Start thread\n");
>  userData* udata = (userData*)data;
>  if(!udata->result)
>  {
>    while((csoundPerformKsmps(udata->csound) == 0)
>           &&(udata->PERF_STATUS==1));
>    csoundCleanup(udata->csound);
>    csoundDestroy(udata->csound);
>  }
>  udata->PERF_STATUS = 0;
>  printf("End thread\n");
>  return 1;
> }
> //--------------------------------------------------------------------------------------------
>
>
> Cheers,
> Andrés
>
> On Sat, Oct 17, 2009 at 8:35 AM, victor <Victor.Lazzarini@...> wrote:
>> The thing to do then, I guess, is to write a small program with a perform
>> thread and see if it has a similar problem to qutecsound.
>>
>> Victor
>> ----- Original Message -----
>> From: "Andres Cabrera" <mantaraya36@...>
>> To: "Michael Gogins" <michael.gogins@...>
>> Cc: "Developer discussions" <csound-devel@...>
>> Sent: Saturday, October 17, 2009 8:20 AM
>> Subject: Re: [Cs-dev] cleanup after performance
>>
>>
>> Hi Michael,
>>
>> Now that I check I am actually using CsPerfThread, I have it ifdef'd
>> and defined by default in the build script, so I missed it. I was
>> having problem with sending score events using the function provided
>> by CsPerfThread, but that's working fine now.
>>
>> The cleanup problem is still there, though, even if I create my own
>> thread (don't define QUTECSOUND_USE_CSOUNDPERFORMANCETHREAD in
>> src.pro)
>>
>> I'm not really sure whether it's my fault, but I don't think anything
>> in QuteCsound has changed in that respect. Maybe Steven or a blue user
>> can chime in to confirm things are fine with the new csound?
>>
>> Cheers,
>> Andrés
>>
>> On Fri, Oct 16, 2009 at 2:46 PM, Michael Gogins
>> <michael.gogins@...> wrote:
>>> This is what happens when you don't use the CsPerfThread.
>>>
>>> What problem did you experience using CsPerfThread's own method for
>>> sending in events?
>>>
>>> Regards,
>>> Mike
>>>
>>> On 10/16/09, Andrés Cabrera <mantaraya36@...> wrote:
>>>> Hi,
>>>>
>>>> I've finally found the reason for the crashing of QuteCsound, but I'm
>>>> not really sure where it's coming from.
>>>> It would seem that the thread which runs csound is getting called again
>>>> and again, after it has joined and csound has stopped. I'm not really
>>>> sure how this can be fixed, but hopefully someone here will know.
>>>> The thread function is in file qutecsound.cpp line 3145. I'm not
>>>> currently using CsPerfThread as I couldn't get the score messages to be
>>>> sent correctly using it, so I create my own thread in qutecsound.cpp
>>>> line 994, which is part of the runCsound() method.
>>>>
>>>> Aparently, when the thread stops by itself (i.e. Csound score ends), the
>>>> thread keeps calling itself again and again, while if it's forced to
>>>> stop by the stop button, it will stop properly.
>>>>
>>>> I added some debugging messages in svn. Also changed the return value of
>>>> the thread function to 1 to see if there was any change. (BTW what
>>>> should the thread function return on success?)
>>>>
>>>> Does anyone know what's going on here?
>>>>
>>>> Cheers,
>>>> Andrés
>>>>
>>>> El jue, 15-10-2009 a las 23:01 +0100, victor escribió:
>>>>> OK, so what I am reporting is not related to this, because it is on
>>>>> OSX. I am not sure even if it's a problem, but it's something
>>>>> that changed in Csound.
>>>>>
>>>>> Victor
>>>>> ----- Original Message -----
>>>>> From: "Michael Gogins" <michael.gogins@...>
>>>>> To: "Developer discussions" <csound-devel@...>
>>>>> Sent: Thursday, October 15, 2009 5:47 PM
>>>>> Subject: Re: [Cs-dev] cleanup after performance
>>>>>
>>>>>
>>>>> > It was used on all systems. I took it out only for Windows.
>>>>> >
>>>>> > Regards,
>>>>> > Mike
>>>>> >
>>>>> > On 10/15/09, Victor Lazzarini <Victor.Lazzarini@...> wrote:
>>>>> >> Was the atexit() handler only used on Windows or on other systems
>>>>> >> too?
>>>>> >>
>>>>> >> Victor
>>>>> >> On 15 Oct 2009, at 15:52, Michael Gogins wrote:
>>>>> >>
>>>>> >>> There was an atexit handler on Windows that I removed. That could be
>>>>> >>> related. It was causing crashes in QuteCsound and other
>>>>> >>> environments,
>>>>> >>> and in my tests I didn't see any bad effects from not using the
>>>>> >>> atexit
>>>>> >>> handler, probably because I don't usually use temporary files.
>>>>> >>>
>>>>> >>> Regards,
>>>>> >>> Mike
>>>>> >>>
>>>>> >>> On 10/15/09, Victor Lazzarini <Victor.Lazzarini@...> wrote:
>>>>> >>>> Regarding the latest issues with Qutecsound, I noticed these
>>>>> >>>> changes
>>>>> >>>> (I don't
>>>>> >>>> know when, but...). The command-line frontend finishes with
>>>>> >>>> different
>>>>> >>>> messages
>>>>> >>>> now:
>>>>> >>>>
>>>>> >>>> Score finished in csoundPerform().
>>>>> >>>> inactive allocs returned to freespace
>>>>> >>>> end of score. overall amps: 0.49919
>>>>> >>>> overall samples out of range: 0
>>>>> >>>> 0 errors in performance
>>>>> >>>> Elapsed time at end of performance: real: 0.496s, CPU: 0.275s
>>>>> >>>> 13781 128-byte soundblks of shorts written to /Users/victor/audio/
>>>>> >>>> test.aif (AIFF)
>>>>> >>>> signalflowgraph: CsoundModuleDestroy(0xdc000)
>>>>> >>>>
>>>>> >>>> The last line I guess comes from Mike's new opcodes. But missing
>>>>> >>>> from
>>>>> >>>> these messages are
>>>>> >>>> the three 'removed temporary file ... ' messages. Does this mean
>>>>> >>>> anything?
>>>>> >>>> Has anything changed in the Csound cleanup process?
>>>>> >>>>
>>>>> >>>> Victor
>>>>> >>>>
>>>>> >>>>
>>>>> >>>>
>>>>> >>>>
>>>>> >>>> ------------------------------------------------------------------------------
>>>>> >>>> Come build with us! The BlackBerry(R) Developer Conference in SF,
>>>>> >>>> CA
>>>>> >>>> is the only developer event you need to attend this year. Jumpstart
>>>>> >>>> your
>>>>> >>>> developing skills, take BlackBerry mobile applications to market
>>>>> >>>> and stay
>>>>> >>>> ahead of the curve. Join us from November 9 - 12, 2009. Register
>>>>> >>>> now!
>>>>> >>>> http://p.sf.net/sfu/devconference
>>>>> >>>> _______________________________________________
>>>>> >>>> Csound-devel mailing list
>>>>> >>>> Csound-devel@...
>>>>> >>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>> >>>>
>>>>> >>>
>>>>> >>>
>>>>> >>> --
>>>>> >>> Michael Gogins
>>>>> >>> Irreducible Productions
>>>>> >>> http://www.michael-gogins.com
>>>>> >>> Michael dot Gogins at gmail dot com
>>>>> >>>
>>>>> >>> ------------------------------------------------------------------------------
>>>>> >>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>>>>> >>> is the only developer event you need to attend this year. Jumpstart
>>>>> >>> your
>>>>> >>> developing skills, take BlackBerry mobile applications to market and
>>>>> >>> stay
>>>>> >>> ahead of the curve. Join us from November 9 - 12, 2009. Register
>>>>> >>> now!
>>>>> >>> http://p.sf.net/sfu/devconference
>>>>> >>> _______________________________________________
>>>>> >>> Csound-devel mailing list
>>>>> >>> Csound-devel@...
>>>>> >>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>> >>
>>>>> >>
>>>>> >> ------------------------------------------------------------------------------
>>>>> >> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>>>>> >> is the only developer event you need to attend this year. Jumpstart
>>>>> >> your
>>>>> >> developing skills, take BlackBerry mobile applications to market and
>>>>> >> stay
>>>>> >> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>>>>> >> http://p.sf.net/sfu/devconference
>>>>> >> _______________________________________________
>>>>> >> Csound-devel mailing list
>>>>> >> Csound-devel@...
>>>>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>> >>
>>>>> >
>>>>> >
>>>>> > --
>>>>> > Michael Gogins
>>>>> > Irreducible Productions
>>>>> > http://www.michael-gogins.com
>>>>> > Michael dot Gogins at gmail dot com
>>>>> >
>>>>> > ------------------------------------------------------------------------------
>>>>> > Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>>>>> > is the only developer event you need to attend this year. Jumpstart
>>>>> > your
>>>>> > developing skills, take BlackBerry mobile applications to market and
>>>>> > stay
>>>>> > ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>>>>> > http://p.sf.net/sfu/devconference
>>>>> > _______________________________________________
>>>>> > Csound-devel mailing list
>>>>> > Csound-devel@...
>>>>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>>>>> is the only developer event you need to attend this year. Jumpstart your
>>>>> developing skills, take BlackBerry mobile applications to market and
>>>>> stay
>>>>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>>>>> http://p.sf.net/sfu/devconference
>>>>> _______________________________________________
>>>>> Csound-devel mailing list
>>>>> Csound-devel@...
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>>>> is the only developer event you need to attend this year. Jumpstart your
>>>> developing skills, take BlackBerry mobile applications to market and stay
>>>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>>>> http://p.sf.net/sfu/devconference
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@...
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>
>>>
>>>
>>> --
>>> Michael Gogins
>>> Irreducible Productions
>>> http://www.michael-gogins.com
>>> Michael dot Gogins at gmail dot com
>>>
>>
>>
>>
>> --
>>
>>
>> Andrés
>>
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart your
>> developing skills, take BlackBerry mobile applications to market and stay
>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> http://p.sf.net/sfu/devconference
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@...
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart your
>> developing skills, take BlackBerry mobile applications to market and stay
>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> http://p.sf.net/sfu/devconference
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@...
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>
>
>
> --
>
>
> Andrés
>



--


Andrés

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel

Re: cleanup after performance

by Andres Cabrera :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

OK, here's one more confirmation that the problem lies in QuteCsound.
Below is a C++ way of using Csound and the CsoundPerfThread class,
which is working fine. Maybe it would be good to put it in the
examples in the sources?

Cheers,
Andrés

#include <stdio.h>
#include <csound/csound.hpp>
#include <csound/csPerfThread.hpp>

// Build with:
// g++ threadtest.cpp -o threadtest -lcsound -lcsnd

//performance thread function prototype
void csThread(void *clientData);

class  userData
{
  public:
    int result;
    Csound csound;
    int PERF_STATUS;
};

//------------------------------------------------------------
int main(int argc, char *argv[])
{
  int userInput=200;
  CsoundPerformanceThread* perfThread;
  userData* ud;
  ud = new userData;
  MYFLT* pvalue;
  ud->result=ud->csound.Compile(argv[1]);
  if(!ud->result)
  {
    ud->PERF_STATUS = 1;
    perfThread = new CsoundPerformanceThread(ud->csound.GetCsound());
    perfThread->SetProcessCallback(csThread, (void*)ud);
    perfThread->Play();
  }
  else{
    printf("csoundCompile returned an error\n");
    return ud->result;
  }
  while(perfThread->GetStatus() == 0) ;  //Stay here while running
  perfThread->Join();
  return ud->result;
}
//-------------------------------------------------------------
//definition of our performance thread function
void csThread(void *data)
{
  printf("Start thread\n");
  userData* udata = (userData*)data;
  if(!udata->result)
  {
    while((udata->csound.PerformKsmps() == 0)
           &&(udata->PERF_STATUS==1));
  }
  udata->PERF_STATUS = 0;
  printf("End thread\n");
}

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel

Re: cleanup after performance

by Victor Lazzarini :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

So what was the problem, then?

Victor
----- Original Message -----
From: "Andres Cabrera" <mantaraya36@...>
To: "Developer discussions" <csound-devel@...>
Sent: Sunday, October 18, 2009 6:31 PM
Subject: Re: [Cs-dev] cleanup after performance


OK, here's one more confirmation that the problem lies in QuteCsound.
Below is a C++ way of using Csound and the CsoundPerfThread class,
which is working fine. Maybe it would be good to put it in the
examples in the sources?

Cheers,
Andrés

#include <stdio.h>
#include <csound/csound.hpp>
#include <csound/csPerfThread.hpp>

// Build with:
// g++ threadtest.cpp -o threadtest -lcsound -lcsnd

//performance thread function prototype
void csThread(void *clientData);

class  userData
{
  public:
    int result;
    Csound csound;
    int PERF_STATUS;
};

//------------------------------------------------------------
int main(int argc, char *argv[])
{
  int userInput=200;
  CsoundPerformanceThread* perfThread;
  userData* ud;
  ud = new userData;
  MYFLT* pvalue;
  ud->result=ud->csound.Compile(argv[1]);
  if(!ud->result)
  {
    ud->PERF_STATUS = 1;
    perfThread = new CsoundPerformanceThread(ud->csound.GetCsound());
    perfThread->SetProcessCallback(csThread, (void*)ud);
    perfThread->Play();
  }
  else{
    printf("csoundCompile returned an error\n");
    return ud->result;
  }
  while(perfThread->GetStatus() == 0) ;  //Stay here while running
  perfThread->Join();
  return ud->result;
}
//-------------------------------------------------------------
//definition of our performance thread function
void csThread(void *data)
{
  printf("Start thread\n");
  userData* udata = (userData*)data;
  if(!udata->result)
  {
    while((udata->csound.PerformKsmps() == 0)
           &&(udata->PERF_STATUS==1));
  }
  udata->PERF_STATUS = 0;
  printf("End thread\n");
}

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel 


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel

Re: cleanup after performance

by Andres Cabrera :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Don't know yet... Still looking, but wanted to make sure the problem
wasn't Csound, as the issue hadn't manifested itself before.

Cheers,
Andrés


On Sun, Oct 18, 2009 at 6:44 PM, victor <Victor.Lazzarini@...> wrote:

> So what was the problem, then?
>
> Victor
> ----- Original Message -----
> From: "Andres Cabrera" <mantaraya36@...>
> To: "Developer discussions" <csound-devel@...>
> Sent: Sunday, October 18, 2009 6:31 PM
> Subject: Re: [Cs-dev] cleanup after performance
>
>
> OK, here's one more confirmation that the problem lies in QuteCsound.
> Below is a C++ way of using Csound and the CsoundPerfThread class,
> which is working fine. Maybe it would be good to put it in the
> examples in the sources?
>
> Cheers,
> Andrés
>
> #include <stdio.h>
> #include <csound/csound.hpp>
> #include <csound/csPerfThread.hpp>
>
> // Build with:
> // g++ threadtest.cpp -o threadtest -lcsound -lcsnd
>
> //performance thread function prototype
> void csThread(void *clientData);
>
> class  userData
> {
>  public:
>    int result;
>    Csound csound;
>    int PERF_STATUS;
> };
>
> //------------------------------------------------------------
> int main(int argc, char *argv[])
> {
>  int userInput=200;
>  CsoundPerformanceThread* perfThread;
>  userData* ud;
>  ud = new userData;
>  MYFLT* pvalue;
>  ud->result=ud->csound.Compile(argv[1]);
>  if(!ud->result)
>  {
>    ud->PERF_STATUS = 1;
>    perfThread = new CsoundPerformanceThread(ud->csound.GetCsound());
>    perfThread->SetProcessCallback(csThread, (void*)ud);
>    perfThread->Play();
>  }
>  else{
>    printf("csoundCompile returned an error\n");
>    return ud->result;
>  }
>  while(perfThread->GetStatus() == 0) ;  //Stay here while running
>  perfThread->Join();
>  return ud->result;
> }
> //-------------------------------------------------------------
> //definition of our performance thread function
> void csThread(void *data)
> {
>  printf("Start thread\n");
>  userData* udata = (userData*)data;
>  if(!udata->result)
>  {
>    while((udata->csound.PerformKsmps() == 0)
>           &&(udata->PERF_STATUS==1));
>  }
>  udata->PERF_STATUS = 0;
>  printf("End thread\n");
> }
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@...
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@...
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>



--


Andrés

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel

Re: cleanup after performance

by Andres Cabrera :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

OK, I think its fixed. Please test and let me know (would be good if
both OS X and Windows is tested).

Thanks,
Andrés

On Sun, Oct 18, 2009 at 6:48 PM, Andres Cabrera <mantaraya36@...> wrote:

> Don't know yet... Still looking, but wanted to make sure the problem
> wasn't Csound, as the issue hadn't manifested itself before.
>
> Cheers,
> Andrés
>
>
> On Sun, Oct 18, 2009 at 6:44 PM, victor <Victor.Lazzarini@...> wrote:
>> So what was the problem, then?
>>
>> Victor
>> ----- Original Message -----
>> From: "Andres Cabrera" <mantaraya36@...>
>> To: "Developer discussions" <csound-devel@...>
>> Sent: Sunday, October 18, 2009 6:31 PM
>> Subject: Re: [Cs-dev] cleanup after performance
>>
>>
>> OK, here's one more confirmation that the problem lies in QuteCsound.
>> Below is a C++ way of using Csound and the CsoundPerfThread class,
>> which is working fine. Maybe it would be good to put it in the
>> examples in the sources?
>>
>> Cheers,
>> Andrés
>>
>> #include <stdio.h>
>> #include <csound/csound.hpp>
>> #include <csound/csPerfThread.hpp>
>>
>> // Build with:
>> // g++ threadtest.cpp -o threadtest -lcsound -lcsnd
>>
>> //performance thread function prototype
>> void csThread(void *clientData);
>>
>> class  userData
>> {
>>  public:
>>    int result;
>>    Csound csound;
>>    int PERF_STATUS;
>> };
>>
>> //------------------------------------------------------------
>> int main(int argc, char *argv[])
>> {
>>  int userInput=200;
>>  CsoundPerformanceThread* perfThread;
>>  userData* ud;
>>  ud = new userData;
>>  MYFLT* pvalue;
>>  ud->result=ud->csound.Compile(argv[1]);
>>  if(!ud->result)
>>  {
>>    ud->PERF_STATUS = 1;
>>    perfThread = new CsoundPerformanceThread(ud->csound.GetCsound());
>>    perfThread->SetProcessCallback(csThread, (void*)ud);
>>    perfThread->Play();
>>  }
>>  else{
>>    printf("csoundCompile returned an error\n");
>>    return ud->result;
>>  }
>>  while(perfThread->GetStatus() == 0) ;  //Stay here while running
>>  perfThread->Join();
>>  return ud->result;
>> }
>> //-------------------------------------------------------------
>> //definition of our performance thread function
>> void csThread(void *data)
>> {
>>  printf("Start thread\n");
>>  userData* udata = (userData*)data;
>>  if(!udata->result)
>>  {
>>    while((udata->csound.PerformKsmps() == 0)
>>           &&(udata->PERF_STATUS==1));
>>  }
>>  udata->PERF_STATUS = 0;
>>  printf("End thread\n");
>> }
>>
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart your
>> developing skills, take BlackBerry mobile applications to market and stay
>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> http://p.sf.net/sfu/devconference
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@...
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart your
>> developing skills, take BlackBerry mobile applications to market and stay
>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> http://p.sf.net/sfu/devconference
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@...
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>
>
>
> --
>
>
> Andrés
>



--


Andrés

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel

Re: cleanup after performance

by Victor Lazzarini :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

What do I need to build qutecsound on the Mac?

Victor
----- Original Message -----
From: "Andres Cabrera" <mantaraya36@...>
To: "Developer discussions" <csound-devel@...>
Sent: Sunday, October 18, 2009 7:59 PM
Subject: Re: [Cs-dev] cleanup after performance


OK, I think its fixed. Please test and let me know (would be good if
both OS X and Windows is tested).

Thanks,
Andrés

On Sun, Oct 18, 2009 at 6:48 PM, Andres Cabrera <mantaraya36@...>
wrote:

> Don't know yet... Still looking, but wanted to make sure the problem
> wasn't Csound, as the issue hadn't manifested itself before.
>
> Cheers,
> Andrés
>
>
> On Sun, Oct 18, 2009 at 6:44 PM, victor <Victor.Lazzarini@...> wrote:
>> So what was the problem, then?
>>
>> Victor
>> ----- Original Message -----
>> From: "Andres Cabrera" <mantaraya36@...>
>> To: "Developer discussions" <csound-devel@...>
>> Sent: Sunday, October 18, 2009 6:31 PM
>> Subject: Re: [Cs-dev] cleanup after performance
>>
>>
>> OK, here's one more confirmation that the problem lies in QuteCsound.
>> Below is a C++ way of using Csound and the CsoundPerfThread class,
>> which is working fine. Maybe it would be good to put it in the
>> examples in the sources?
>>
>> Cheers,
>> Andrés
>>
>> #include <stdio.h>
>> #include <csound/csound.hpp>
>> #include <csound/csPerfThread.hpp>
>>
>> // Build with:
>> // g++ threadtest.cpp -o threadtest -lcsound -lcsnd
>>
>> //performance thread function prototype
>> void csThread(void *clientData);
>>
>> class userData
>> {
>> public:
>> int result;
>> Csound csound;
>> int PERF_STATUS;
>> };
>>
>> //------------------------------------------------------------
>> int main(int argc, char *argv[])
>> {
>> int userInput=200;
>> CsoundPerformanceThread* perfThread;
>> userData* ud;
>> ud = new userData;
>> MYFLT* pvalue;
>> ud->result=ud->csound.Compile(argv[1]);
>> if(!ud->result)
>> {
>> ud->PERF_STATUS = 1;
>> perfThread = new CsoundPerformanceThread(ud->csound.GetCsound());
>> perfThread->SetProcessCallback(csThread, (void*)ud);
>> perfThread->Play();
>> }
>> else{
>> printf("csoundCompile returned an error\n");
>> return ud->result;
>> }
>> while(perfThread->GetStatus() == 0) ; //Stay here while running
>> perfThread->Join();
>> return ud->result;
>> }
>> //-------------------------------------------------------------
>> //definition of our performance thread function
>> void csThread(void *data)
>> {
>> printf("Start thread\n");
>> userData* udata = (userData*)data;
>> if(!udata->result)
>> {
>> while((udata->csound.PerformKsmps() == 0)
>> &&(udata->PERF_STATUS==1));
>> }
>> udata->PERF_STATUS = 0;
>> printf("End thread\n");
>> }
>>
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart your
>> developing skills, take BlackBerry mobile applications to market and stay
>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> http://p.sf.net/sfu/devconference
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@...
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart your
>> developing skills, take BlackBerry mobile applications to market and stay
>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> http://p.sf.net/sfu/devconference
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@...
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>
>
>
> --
>
>
> Andrés
>



--


Andrés

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel 


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel

Re: cleanup after performance

by Andres Cabrera :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Qt (http://qt.nokia.com/downloads) and Xcode. Just run "qmake" on the
src/ directory of the QuteCsound sources and that will create an Xcode
project which should build QuteCsound directly.

Cheers,
Andrés

On Sun, Oct 18, 2009 at 9:37 PM, victor <Victor.Lazzarini@...> wrote:

> What do I need to build qutecsound on the Mac?
>
> Victor
> ----- Original Message -----
> From: "Andres Cabrera" <mantaraya36@...>
> To: "Developer discussions" <csound-devel@...>
> Sent: Sunday, October 18, 2009 7:59 PM
> Subject: Re: [Cs-dev] cleanup after performance
>
>
> OK, I think its fixed. Please test and let me know (would be good if
> both OS X and Windows is tested).
>
> Thanks,
> Andrés
>
> On Sun, Oct 18, 2009 at 6:48 PM, Andres Cabrera <mantaraya36@...>
> wrote:
>> Don't know yet... Still looking, but wanted to make sure the problem
>> wasn't Csound, as the issue hadn't manifested itself before.
>>
>> Cheers,
>> Andrés
>>
>>
>> On Sun, Oct 18, 2009 at 6:44 PM, victor <Victor.Lazzarini@...> wrote:
>>> So what was the problem, then?
>>>
>>> Victor
>>> ----- Original Message -----
>>> From: "Andres Cabrera" <mantaraya36@...>
>>> To: "Developer discussions" <csound-devel@...>
>>> Sent: Sunday, October 18, 2009 6:31 PM
>>> Subject: Re: [Cs-dev] cleanup after performance
>>>
>>>
>>> OK, here's one more confirmation that the problem lies in QuteCsound.
>>> Below is a C++ way of using Csound and the CsoundPerfThread class,
>>> which is working fine. Maybe it would be good to put it in the
>>> examples in the sources?
>>>
>>> Cheers,
>>> Andrés
>>>
>>> #include <stdio.h>
>>> #include <csound/csound.hpp>
>>> #include <csound/csPerfThread.hpp>
>>>
>>> // Build with:
>>> // g++ threadtest.cpp -o threadtest -lcsound -lcsnd
>>>
>>> //performance thread function prototype
>>> void csThread(void *clientData);
>>>
>>> class userData
>>> {
>>> public:
>>> int result;
>>> Csound csound;
>>> int PERF_STATUS;
>>> };
>>>
>>> //------------------------------------------------------------
>>> int main(int argc, char *argv[])
>>> {
>>> int userInput=200;
>>> CsoundPerformanceThread* perfThread;
>>> userData* ud;
>>> ud = new userData;
>>> MYFLT* pvalue;
>>> ud->result=ud->csound.Compile(argv[1]);
>>> if(!ud->result)
>>> {
>>> ud->PERF_STATUS = 1;
>>> perfThread = new CsoundPerformanceThread(ud->csound.GetCsound());
>>> perfThread->SetProcessCallback(csThread, (void*)ud);
>>> perfThread->Play();
>>> }
>>> else{
>>> printf("csoundCompile returned an error\n");
>>> return ud->result;
>>> }
>>> while(perfThread->GetStatus() == 0) ; //Stay here while running
>>> perfThread->Join();
>>> return ud->result;
>>> }
>>> //-------------------------------------------------------------
>>> //definition of our performance thread function
>>> void csThread(void *data)
>>> {
>>> printf("Start thread\n");
>>> userData* udata = (userData*)data;
>>> if(!udata->result)
>>> {
>>> while((udata->csound.PerformKsmps() == 0)
>>> &&(udata->PERF_STATUS==1));
>>> }
>>> udata->PERF_STATUS = 0;
>>> printf("End thread\n");
>>> }
>>>
>>> ------------------------------------------------------------------------------
>>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>>> is the only developer event you need to attend this year. Jumpstart your
>>> developing skills, take BlackBerry mobile applications to market and stay
>>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>>> http://p.sf.net/sfu/devconference
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@...
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>>> is the only developer event you need to attend this year. Jumpstart your
>>> developing skills, take BlackBerry mobile applications to market and stay
>>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>>> http://p.sf.net/sfu/devconference
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@...
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>
>>
>>
>> --
>>
>>
>> Andrés
>>
>
>
>
> --
>
>
> Andrés
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@...
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@...
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>



--


Andrés

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel

incorrect CsPerfThread example (was Re: cleanup after performance)

by Victor Lazzarini :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This code is not correct. It sets up a callback to call performKsmps()
again (it is already called by the CsoundPerformanceThread::Perform()
method).

It is probably going to cause trouble somewhere. The Performance
callback is not supposed to do this (it is for graphs and other repeated
actions).

Victor


On 18 Oct 2009, at 18:31, Andres Cabrera wrote:

> OK, here's one more confirmation that the problem lies in QuteCsound.
> Below is a C++ way of using Csound and the CsoundPerfThread class,
> which is working fine. Maybe it would be good to put it in the
> examples in the sources?
>
> Cheers,
> Andrés
>
> #include <stdio.h>
> #include <csound/csound.hpp>
> #include <csound/csPerfThread.hpp>
>
> // Build with:
> // g++ threadtest.cpp -o threadtest -lcsound -lcsnd
>
> //performance thread function prototype
> void csThread(void *clientData);
>
> class  userData
> {
>  public:
>    int result;
>    Csound csound;
>    int PERF_STATUS;
> };
>
> //------------------------------------------------------------
> int main(int argc, char *argv[])
> {
>  int userInput=200;
>  CsoundPerformanceThread* perfThread;
>  userData* ud;
>  ud = new userData;
>  MYFLT* pvalue;
>  ud->result=ud->csound.Compile(argv[1]);
>  if(!ud->result)
>  {
>    ud->PERF_STATUS = 1;
>    perfThread = new CsoundPerformanceThread(ud->csound.GetCsound());
>    perfThread->SetProcessCallback(csThread, (void*)ud);
>    perfThread->Play();
>  }
>  else{
>    printf("csoundCompile returned an error\n");
>    return ud->result;
>  }
>  while(perfThread->GetStatus() == 0) ;  //Stay here while running
>  perfThread->Join();
>  return ud->result;
> }
> //-------------------------------------------------------------
> //definition of our performance thread function
> void csThread(void *data)
> {
>  printf("Start thread\n");
>  userData* udata = (userData*)data;
>  if(!udata->result)
>  {
>    while((udata->csound.PerformKsmps() == 0)
>           &&(udata->PERF_STATUS==1));
>  }
>  udata->PERF_STATUS = 0;
>  printf("End thread\n");
> }
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart  
> your
> developing skills, take BlackBerry mobile applications to market and  
> stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@...
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel

Re: incorrect CsPerfThread example (was Re: cleanup after performance)

by Victor Lazzarini :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

And here is a correct one. I've included a call to  
CsoundPerformance::ScoreEvent()
and it works perfectly here.

#include <stdio.h>
#include "csound.hpp"
#include "csPerfThread.hpp"

int main(int argc, char *argv[])
{
  int result=0;
  CsoundPerformanceThread* perfThread;
  Csound cs;
  MYFLT* pvalue;
  MYFLT pp[5] = {1.0,0.0,2.0,0.5,500.0};
  result=cs.Compile(argc,argv);
  if(!result)
  {
    perfThread = new CsoundPerformanceThread(cs.GetCsound());
    perfThread->ScoreEvent(0, 'i', 5, pp);
    perfThread->Play();
  }
  else{
    printf("csoundCompile returned an error\n");
    return 1;
  }
  while(perfThread->GetStatus() == 0) ;  //Stay here while running
  perfThread->Join();
  return 0;
}


On 19 Oct 2009, at 10:47, Victor Lazzarini wrote:

> This code is not correct. It sets up a callback to call performKsmps()
> again (it is already called by the CsoundPerformanceThread::Perform()
> method).
>
> It is probably going to cause trouble somewhere. The Performance
> callback is not supposed to do this (it is for graphs and other  
> repeated
> actions).
>
> Victor
>
>
> On 18 Oct 2009, at 18:31, Andres Cabrera wrote:
>
>> OK, here's one more confirmation that the problem lies in QuteCsound.
>> Below is a C++ way of using Csound and the CsoundPerfThread class,
>> which is working fine. Maybe it would be good to put it in the
>> examples in the sources?
>>
>> Cheers,
>> Andrés
>>
>> #include <stdio.h>
>> #include <csound/csound.hpp>
>> #include <csound/csPerfThread.hpp>
>>
>> // Build with:
>> // g++ threadtest.cpp -o threadtest -lcsound -lcsnd
>>
>> //performance thread function prototype
>> void csThread(void *clientData);
>>
>> class  userData
>> {
>> public:
>>   int result;
>>   Csound csound;
>>   int PERF_STATUS;
>> };
>>
>> //------------------------------------------------------------
>> int main(int argc, char *argv[])
>> {
>> int userInput=200;
>> CsoundPerformanceThread* perfThread;
>> userData* ud;
>> ud = new userData;
>> MYFLT* pvalue;
>> ud->result=ud->csound.Compile(argv[1]);
>> if(!ud->result)
>> {
>>   ud->PERF_STATUS = 1;
>>   perfThread = new CsoundPerformanceThread(ud->csound.GetCsound());
>>   perfThread->SetProcessCallback(csThread, (void*)ud);
>>   perfThread->Play();
>> }
>> else{
>>   printf("csoundCompile returned an error\n");
>>   return ud->result;
>> }
>> while(perfThread->GetStatus() == 0) ;  //Stay here while running
>> perfThread->Join();
>> return ud->result;
>> }
>> //-------------------------------------------------------------
>> //definition of our performance thread function
>> void csThread(void *data)
>> {
>> printf("Start thread\n");
>> userData* udata = (userData*)data;
>> if(!udata->result)
>> {
>>   while((udata->csound.PerformKsmps() == 0)
>>          &&(udata->PERF_STATUS==1));
>> }
>> udata->PERF_STATUS = 0;
>> printf("End thread\n");
>> }
>>
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart
>> your
>> developing skills, take BlackBerry mobile applications to market and
>> stay
>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> http://p.sf.net/sfu/devconference
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@...
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart  
> your
> developing skills, take BlackBerry mobile applications to market and  
> stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@...
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel
< Prev | 1 - 2 | Next >