I don't think line 128 factors into this. The playback.py script is pretty stripped down, so it's easy to see what's going on.
- Sets up the Twisted reactor object based on configuration
- The only thing added to this app is the dmrd_received() method, which only gets called when network traffic comes in. <<==== THIS RIGHT HERE is the reason timers and timeouts inside of dmrd_received will not work. The method can't sit around waiting to see if a voice terminator packet shows up. That's because this is UDP and there's no connection per se. The playback.py app processes whatever comes in, and nothing else.
- There are other things we can leverage in Twisted, including timers that will dispatch regularly where in-process voice streams can be swept up and handled. That's where I'm looking to make changes. I don't think there's necessarily any change needed in dmrd_received() in the code as it is written right now. That conclusion might change, but it won't be a huge rewrite of the method, just tweaks.
Thanks for looking into it. Read up on LoopingCall (https://twistedmatrix.com/documents/current/api/twisted.internet.task.LoopingCall.html
) in Twisted if you want to understand what I'm thinking about here.
Randy Hall AA6RH (not K7AGE, quit asking) 😁