Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update TeamTalk5.py #2411

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

colonel-official
Copy link

Hello. This is my first contribution at GH. So please excuse me if I'm doing something wrong. As a result of my tests, I noticed that TeamTalk counts non-ASCII characters as extra characters when sending a message larger than 512 characters containing UTF-8 characters, that is, it sends the message incomplete. So I rolled up my sleeves and updated the buildTextMessage function so that it counts non-ASCII characters as extra characters when splitting a message.

@@ -1157,7 +1157,7 @@ def function_factory(func, signature):
_InitLocalPlayback = function_factory(dll.TT_InitLocalPlayback, [INT32, [_TTInstance, TTCHAR_P, POINTER(MediaFilePlayback)]])
_UpdateLocalPlayback = function_factory(dll.TT_UpdateLocalPlayback, [BOOL, [_TTInstance, INT32, POINTER(MediaFilePlayback)]])
_StopLocalPlayback = function_factory(dll.TT_StopLocalPlayback, [BOOL, [_TTInstance, INT32]])
_GetMediaFileInfo = function_factory(dll.TT_GetMediaFileInfo, [BOOL, [TTCHAR_P, POINTER(MediaFileInfo)]])
_GetMediaFileInfo = function_factory(dll.TT_GetMediaFileInfo, [BOOL, [_TTInstance, TTCHAR_P, POINTER(MediaFileInfo)]])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you modify this line? This function has no instance parameter.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, the teamtalk py I made changes to was old, I think. I just realized that.

@@ -1634,10 +1652,6 @@ def acquireUserAudioBlock(self, uStreamTypes: StreamType, nUserID: int) -> POINT
def releaseUserAudioBlock(self, lpAudioBlock: POINTER(AudioBlock)) -> bool:
return _ReleaseUserAudioBlock(self._tt, lpAudioBlock)

def getMediaFileInfo(szMediaFilePath) -> MediaFileInfo:
mfi = MediaFileInfo()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this function should be fully restored.
Moreover, it is out of scope from this pull request to modify it in any manner.

@colonel-official
Copy link
Author

I'll turn off this pull request and turn it back on. Sorry again.

@colonel-official
Copy link
Author

Or can changes be made without closing? I'll look into it.

@Nardol
Copy link
Contributor

Nardol commented Jul 7, 2024

Or can changes be made without closing? I'll look into it.

Make some tests locally but I think you should be able to make your modifications without closing, mark this pull request as draft while you look for a solution.

@colonel-official colonel-official requested a review from Nardol July 7, 2024 19:08
@Nardol
Copy link
Contributor

Nardol commented Jul 7, 2024

Why did you request a review? Except if I missed something, you did not make any change...

@colonel-official
Copy link
Author

Sorry. Will you check it again now?

@colonel-official
Copy link
Author

I bought the latest TEAMTALKPY from the repo and updated the buildTextMessage function.

Copy link
Author

@colonel-official colonel-official left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new version is being used instead of the old version TeamTalkPy. The desired change has been made.

@OzancanKaratas
Copy link
Contributor

Does this pull request fix high CPU usage in TTMediaBot? CC: @beqabeqa473 Can you review?

@bear101 bear101 marked this pull request as draft January 5, 2025 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants