Csound Csound-dev Csound-tekno Search About

[Cs-dev] rtpa statics

Date2005-05-02 20:34
FromVictor Lazzarini
Subject[Cs-dev] rtpa statics
The rtpa.c statics situation boils down now to three
variables:

static PA_BLOCKING_STREAM *pabsRead = 0;
static PA_BLOCKING_STREAM *pabsWrite = 0;
static int openOnce = 0;

Can we move them into ENVIRON or csRtAudioParams ?
In the latter case, we would need to pass csRtAudioParams
to rtclose_ (is that a problem?).

Victor


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-05-02 20:51
FromIstvan Varga
SubjectRe: [Cs-dev] rtpa statics
csRtAudioParams is a generic structure used to pass audio parameters
to plugins, and is thus not really suitable for storage of private data
of externals. ENVIRON is somewhat better but is still not quite right.
There are, however, pointers in ENVIRON specifically reserved for use
by real-time audio plugins, and you can get pointers to these pointers
(for read/write access) with the following API functions:
     void **(*GetRtRecordUserData)(void *csound);
     void **(*GetRtPlayUserData)(void *csound);
Additionally, you can create your own named dynamic "global variables"
with csound->CreateGlobalVariable(), without having to edit ENVIRON
(rtpa.c is not part of the Csound engine, after all); see rtalsa.c and
rtjack.c for examples of using this interface.

Victor Lazzarini wrote:

> The rtpa.c statics situation boils down now to three
> variables:
> 
> static PA_BLOCKING_STREAM *pabsRead = 0;
> static PA_BLOCKING_STREAM *pabsWrite = 0;
> static int openOnce = 0;
> 
> Can we move them into ENVIRON or csRtAudioParams ?
> In the latter case, we would need to pass csRtAudioParams
> to rtclose_ (is that a problem?).


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-05-03 09:22
FromVictor Lazzarini
SubjectRe: [Cs-dev] rtpa statics
Thanks for the suggestion. I moved all the static global variables in
rtpa.c to use CreateGlobalVariables(). I'll tidy the code, test it again
and commit hopefully tonight. Then perhaps we can think of merging
with rtpa_new.c

Victor

At 20:51 02/05/2005, you wrote:
>csRtAudioParams is a generic structure used to pass audio parameters
>to plugins, and is thus not really suitable for storage of private data
>of externals. ENVIRON is somewhat better but is still not quite right.
>There are, however, pointers in ENVIRON specifically reserved for use
>by real-time audio plugins, and you can get pointers to these pointers
>(for read/write access) with the following API functions:
>     void **(*GetRtRecordUserData)(void *csound);
>     void **(*GetRtPlayUserData)(void *csound);
>Additionally, you can create your own named dynamic "global variables"
>with csound->CreateGlobalVariable(), without having to edit ENVIRON
>(rtpa.c is not part of the Csound engine, after all); see rtalsa.c and
>rtjack.c for examples of using this interface.
>
>Victor Lazzarini wrote:
>
>>The rtpa.c statics situation boils down now to three
>>variables:
>>static PA_BLOCKING_STREAM *pabsRead = 0;
>>static PA_BLOCKING_STREAM *pabsWrite = 0;
>>static int openOnce = 0;
>>Can we move them into ENVIRON or csRtAudioParams ?
>>In the latter case, we would need to pass csRtAudioParams
>>to rtclose_ (is that a problem?).
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by: NEC IT Guy Games.
>Get your fingers limbered up and give it your best shot. 4 great events, 4
>opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
>win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
>_______________________________________________
>Csound-devel mailing list
>Csound-devel@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/csound-devel

Victor Lazzarini
Music Technology Laboratory
Music Department
National University of Ireland, Maynooth 



-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net