speechd-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

C API: Query regarding Speech Dispatcher Callbacks and State Management


From: Day Garwood
Subject: C API: Query regarding Speech Dispatcher Callbacks and State Management
Date: Sat, 16 Sep 2023 22:14:34 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1

Hi there,

I'm facing a challenge while interfacing with Speech Dispatcher and would appreciate any insights or recommendations.

I need to maintain a certain state across callbacks from Speech Dispatcher. My state is stored in a struct that I usually pass around to all my functions, but from what I can gather, the current callback mechanism doesn't allow for sending user data or context. As a result, when the callback gets triggered, I lack a direct method to access or modify the associated state.

I have looked at the documentation, and even skimmed some of the relevant source files, but can't seem to find out if user data can be stored anywhere else (the connection, for instance).

I am looking for a way to accomplish this without the use of global variables. The only other way I can think of is using files, environment variables, or shared memory, but given the nature of the project this presents challenges of its own and causes unnecessary overhead.

Is there a known or recommended way to maintain state with the current Speech Dispatcher callback mechanism? Have other developers encountered similar issues, and if so, how did they address them?

Are there discussions or plans to enhance the callback system to support user context or provide a method to access state?

I believe there's much I can learn from the collective experience of the community, and any guidance you can provide will be greatly appreciated.

Look forward to hearing from you.

All the best.

Day Garwood.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]