Radio.TXAudioStreamAddedEventHandler ... really?

  • 1
  • Question
  • Updated 4 months ago
  • Answered
I have implemented a whole bunch of Event Handlers with no problem BUT have had NO luck with the TXAudioStream in that regard.

I set the code below and it compiles with no errors and causes no run time errors BUT it NEVER catches any fired off events.  From looking at the SmartSDR API it would appear the ONLY possible way to get the TXAudioStream ID ...

The TXAudioStreamAdded event is set up in the API_RadioAdded(Radio radio) section of code with most of the other event handler creations.

................

                radio.TXAudioStreamAdded += new Flex.Smoothlake.FlexLib.Radio.TXAudioStreamAddedEventHandler(radio_TXAudioStreamAdded);

.................

        void radio_TXAudioStreamAdded(TXAudioStream tx_audio_stream)
        {
             int test = 0;
        }

...................

Has anyone had ANY luck using this event handler and seeing an event be fired??

I don't have all that much hair on my head left - I'd like to keep it hihi

---Gary WB8ROL
Photo of Gary L. Robinson

Gary L. Robinson

  • 246 Posts
  • 48 Reply Likes

Posted 4 months ago

  • 1
Photo of Mark - WS7M

Mark - WS7M

  • 1010 Posts
  • 360 Reply Likes
Gary,

I cannot get it to trigger either.  I've not tried to use it before but I get no hits on the event handler and have tried various options in SSDR.

Think Flex will have to answer!
Photo of Gary L. Robinson

Gary L. Robinson

  • 246 Posts
  • 48 Reply Likes
Thanks Mark!  It's been driving me crazy for several days (XYL says that is my normal state hihi).  At least I am convinced that there is something wrong with the event handler OR it takes some "special sauce" to make it work.  If no one, including anyone from Flex, chimes in with some new pertinent information in a few days I will try an email to one of their programmers.

---Gary WB8ROL
Photo of James Whiteway

James Whiteway

  • 903 Posts
  • 221 Reply Likes
Eric would probably be the one to contact. He's helped me a lot in the past.
Photo of Wayne

Wayne

  • 614 Posts
  • 84 Reply Likes
Is this related to opus as i understand opus does the audio stream, once i was wrong but then discovered i was mistaken ;-)
Photo of Gary L. Robinson

Gary L. Robinson

  • 246 Posts
  • 48 Reply Likes
I am not sure this is related to opus.  I do know that there are Radio class members to set up event handlers just like I have done for many other objects - but perhaps audio streams are handled differently.

Hmmmm.  I may try and do the same with other audio stream objects and see if I get the same result. 

Thanks for the possible clue Wayne.  If I end up writing Flex (probably Eric as suggested by James in posting above) then I may get to the bottom of this or at least some sort of explanation of what is going on.

Thanks!  and Thanks to James also!

---Gary WB8ROL
Photo of Wayne

Wayne

  • 614 Posts
  • 84 Reply Likes
You might try searching "audio stream" in the search bar there are numerous interesting related posts which may offer some direction.
Photo of Doug - K3TZR

Doug - K3TZR

  • 105 Posts
  • 11 Reply Likes
Mario,

I think you are correct. The xAPITester that I used to create the log ignores the isAudioStreamStatusForThisClient() method; it observes all streams.

So your explanation explains why Gary sees the event when he manually creates a TxAudioStream in his code but does not see the event when SmartDAX creates the TxAudioStream.
Photo of Gary L. Robinson

Gary L. Robinson

  • 246 Posts
  • 48 Reply Likes
Thanks Mario and Doug!  Well this is making me consider on possibly modifying the FlexLib code (TXAudioStream) slightly to add some public functionality to it that I want .

If, for instance, I modify the TXAudioStream.cs file and recompile the DLL and replace the one already installed on my Windows computer with mine - I believe SmartSDR will probably see it as an "update" and let me load it into the rig.  I may write Eric about that.  I assume it could affect my warranty but that does not bother me a lot. 

---Gary WB8ROL
Photo of James Whiteway

James Whiteway

  • 903 Posts
  • 221 Reply Likes
Those files in the Flex library don't get loaded into the radio. They are used by SSDR or any client program to communicate with the radio.
The firmware in the radio only gets modified by an official Flex Update. You won't be voiding your warranty by modifying the .cs files and recompiling them. Other than your own prigram responding to the changes, SSDR would ignore the new lines of code or crash.
James

(Been there done that when I dropped modified dll's into SSDR's folder in Program files in Windows)
(Edited)
Photo of Mario - DL3LSM

Mario - DL3LSM

  • 63 Posts
  • 23 Reply Likes
Hi Gary,

as the changes are needed only for your client there would be no need to drop the changed dll into SmartSDR's folder. Just use it for your app and SSDR will be unaffected..

73, Mario DL3LSM
Photo of Gary L. Robinson

Gary L. Robinson

  • 246 Posts
  • 48 Reply Likes
Thanks James and Mario for the additional info! 

---Gary WB8ROL