Skip to content

Commit

Permalink
Remove problematic type check for Cython. Fixes #71
Browse files Browse the repository at this point in the history
  • Loading branch information
irmen committed Sep 11, 2024
1 parent d506f83 commit 589f612
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions miniaudio.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Software license: "MIT software license". See http://opensource.org/licenses/MIT
"""

__version__ = "1.61"
__version__ = "1.62.dev0"


import abc
Expand Down Expand Up @@ -1403,8 +1403,9 @@ def start(self, callback_generator: GeneratorTypes) -> None:
"""Start playback or capture, using the given callback generator (should already been started)"""
if self.callback_generator:
raise MiniaudioError("can't start an already started device")
if not inspect.isgenerator(callback_generator):
raise TypeError("callback must be a generator", type(callback_generator))
# This check fails on Cython... just skip it:
# if not inspect.isgenerator(callback_generator):
# raise TypeError("callback must be a generator", type(callback_generator))
self.callback_generator = callback_generator
result = lib.ma_device_start(self._device)
if result != lib.MA_SUCCESS:
Expand Down

0 comments on commit 589f612

Please sign in to comment.