Skip to content

Commit

Permalink
修复 get_duration 结果不对问题
Browse files Browse the repository at this point in the history
  • Loading branch information
lemisky committed May 26, 2023
1 parent 4e9b505 commit 79a5d75
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -186,4 +186,8 @@ cython_debug/
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
#.idea/
/dev/
/test/
/main.py
/build_wheel.bat
10 changes: 4 additions & 6 deletions pilk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
__title__ = 'pilk'
__description__ = 'python silk codec binding'
__url__ = 'https://github.com/foyoux/pilk'
__version__ = '0.0.2'
__version__ = '0.2.4'
# noinspection SpellCheckingInspection
__author__ = 'foyou'
__author_email__ = '[email protected]'
__license__ = 'Apache 2.0'
__copyright__ = f'Copyright 2022 {__author__}'
__license__ = ' GPL-3.0'
__copyright__ = f'Copyright 2022~2023 {__author__}'
__ide__ = 'PyCharm - https://www.jetbrains.com/pycharm/'


Expand All @@ -33,10 +33,8 @@ def get_duration(silk_path: str, frame_ms: int = 20) -> int:
size = silk.read(2)
if len(size) != 2:
break
size = size[0] + size[1] << 8
if not tencent and size == 0xffff:
break
i += 1
size = size[0] + size[1] * 16
silk.seek(silk.tell() + size)
return i * frame_ms

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# noinspection SpellCheckingInspection
setup(
name='pilk',
version='0.2.3',
version='0.2.4',
description='python silk voice library',
long_description=long_description,
long_description_content_type='text/markdown',
Expand Down

0 comments on commit 79a5d75

Please sign in to comment.