Skip to content

Commit

Permalink
PulseAudioUtils: Avoid creating empty Structure classes
Browse files Browse the repository at this point in the history
  • Loading branch information
infirit committed Oct 2, 2023
1 parent 2639f55 commit 099a543
Showing 1 changed file with 17 additions and 22 deletions.
39 changes: 17 additions & 22 deletions blueman/main/PulseAudioUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,32 +96,27 @@ class PANotConnected(Exception):


class PaCardProfileInfo(Structure):
pass


PaCardProfileInfo._fields_ = [
('name', c_char_p),
('description', c_char_p),
('n_sinks', c_uint32),
('n_sources', c_uint32),
('priority', c_uint32),
]
_fields_ = [
('name', c_char_p),
('description', c_char_p),
('n_sinks', c_uint32),
('n_sources', c_uint32),
('priority', c_uint32),
]


class PaCardInfo(Structure):
pass

_fields_ = [
('index', c_uint32),
('name', c_char_p),
('owner_module', c_uint32),
('driver', c_char_p),
('n_profiles', c_uint32),
('profiles', POINTER(PaCardProfileInfo)),
('active_profile', POINTER(PaCardProfileInfo)),
('proplist', c_void_p),
]

PaCardInfo._fields_ = [
('index', c_uint32),
('name', c_char_p),
('owner_module', c_uint32),
('driver', c_char_p),
('n_profiles', c_uint32),
('profiles', POINTER(PaCardProfileInfo)),
('active_profile', POINTER(PaCardProfileInfo)),
('proplist', c_void_p),
]

pa_context_notify_cb_t = CFUNCTYPE(None, c_void_p, py_object)

Expand Down

0 comments on commit 099a543

Please sign in to comment.