powccoreaudio.mmdevice module

目次

powccoreaudio.mmdevice module#

マルチメディアデバイス。

主なクラスは MMDeviceEnumeratorMMDevice です。

class powccoreaudio.mmdevice.AudioExtensionParams#

ベースクラス: Structure

add_page_param#

Structure/Union member

endppoint_p#

Structure/Union member

pnp_devnode_p#

Structure/Union member

pnp_interface_p#

Structure/Union member

class powccoreaudio.mmdevice.AudioSystemEffectsPropStoreType(*values)#

ベースクラス: IntEnum

AUDIO_SYSTEMEFFECTS_PROPERTYSTORE_TYPE

DEFAULT = 0#
USER = 1#
VOLATILE = 2#
class powccoreaudio.mmdevice.AudioSystemEffectsPropertyStore(o: Any)#

ベースクラス: object

聴覚システム効果プロパティストア。IAudioSystemEffectsPropertyStoreインターフェイスのラッパーです。

作成にはMMDeviceを使用します。

IAudioSystemEffectsPropertyChangeNotificationClientType#

:py:class:`~comtypes._post_coinit.unknwn.POINTER(IAudioSystemEffectsPropertyChangeNotificationClient)`の別名です。

open_defaultpropstore(stg: StorageMode) PropertyStore#
open_defaultpropstore_nothrow(stg: StorageMode) ComResult[PropertyStore]#
open_userpropstore(stg: StorageMode) PropertyStore#
open_userpropstore_nothrow(stg: StorageMode) ComResult[PropertyStore]#
open_volatilepropstore(stg: StorageMode) PropertyStore#
open_volatilepropstore_nothrow(stg: StorageMode) ComResult[PropertyStore]#
register_propchangenotification(client: POINTER(IAudioSystemEffectsPropertyChangeNotificationClient)) None#
register_propchangenotification_nothrow(client: POINTER(IAudioSystemEffectsPropertyChangeNotificationClient)) ComResult[None]#
reset_userpropstore() None#
reset_userpropstore_nothrow() ComResult[None]#
reset_volatilepropstore() None#
reset_volatilepropstore_nothrow() ComResult[None]#
unregister_propchangenotification(client: POINTER(IAudioSystemEffectsPropertyChangeNotificationClient)) None#
unregister_propchangenotification_nothrow(client: POINTER(IAudioSystemEffectsPropertyChangeNotificationClient)) ComResult[None]#
property wrapped_obj: c_void_p#
class powccoreaudio.mmdevice.DataFlow(*values)#

ベースクラス: IntEnum

EDataFlow

All = 2#
Capture = 1#
Render = 0#
class powccoreaudio.mmdevice.DeviceState(*values)#

ベースクラス: IntFlag

ACTIVE = 1#
DISABLED = 2#
NOTPRESENT = 4#
UNPLUGGED = 8#
class powccoreaudio.mmdevice.DirectXAudioActivationParams#

ベースクラス: Structure

DIRECTX_AUDIO_ACTIVATION_PARAMS

audio_session_guid#

Structure/Union member

audio_stream_flags#

Structure/Union member

directx_audio_activation_params#

Structure/Union member

class powccoreaudio.mmdevice.EndpointFormFactor(*values)#

ベースクラス: IntEnum

DigitalAudioDisplayDevice = 9#
Handset = 6#
Headphones = 3#
Headset = 5#
LineLevel = 2#
Microphone = 4#
RemoteNetworkDevice = 0#
SPDIF = 8#
Speakers = 1#
UnknownDigitalPassthrough = 7#
UnknownFormFactor = 10#
class powccoreaudio.mmdevice.IActivateAudioInterfaceAsyncOperation#

ベースクラス: IUnknown

GetActivateResult = <COM method offset 3: WinFunctionType>#
class powccoreaudio.mmdevice.IActivateAudioInterfaceCompletionHandler#

ベースクラス: IUnknown

ActivateCompleted = <COM method offset 3: WinFunctionType>#
class powccoreaudio.mmdevice.IAudioSystemEffectsPropertyChangeNotificationClient#

ベースクラス: IUnknown

OnPropertyChanged = <COM method offset 3: WinFunctionType>#
class powccoreaudio.mmdevice.IAudioSystemEffectsPropertyStore#

ベースクラス: IUnknown

OpenDefaultPropertyStore = <COM method offset 3: WinFunctionType>#
OpenUserPropertyStore = <COM method offset 4: WinFunctionType>#
OpenVolatilePropertyStore = <COM method offset 5: WinFunctionType>#
RegisterPropertyChangeNotification = <COM method offset 8: WinFunctionType>#
ResetUserPropertyStore = <COM method offset 6: WinFunctionType>#
ResetVolatilePropertyStore = <COM method offset 7: WinFunctionType>#
UnregisterPropertyChangeNotification = <COM method offset 9: WinFunctionType>#
class powccoreaudio.mmdevice.IMMDevice#

ベースクラス: IUnknown

Activate = <COM method offset 3: WinFunctionType>#
GetId = <COM method offset 5: WinFunctionType>#
GetState = <COM method offset 6: WinFunctionType>#
OpenPropertyStore = <COM method offset 4: WinFunctionType>#
class powccoreaudio.mmdevice.IMMDeviceActivator#

ベースクラス: IUnknown

Activate = <COM method offset 3: WinFunctionType>#
class powccoreaudio.mmdevice.IMMDeviceCollection#

ベースクラス: IUnknown

GetCount = <COM method offset 3: WinFunctionType>#
Item = <COM method offset 4: WinFunctionType>#
class powccoreaudio.mmdevice.IMMDeviceEnumerator#

ベースクラス: IUnknown

EnumAudioEndpoints = <COM method offset 3: WinFunctionType>#
GetDefaultAudioEndpoint = <COM method offset 4: WinFunctionType>#
GetDevice = <COM method offset 5: WinFunctionType>#
RegisterEndpointNotificationCallback = <COM method offset 6: WinFunctionType>#
UnregisterEndpointNotificationCallback = <COM method offset 7: WinFunctionType>#
class powccoreaudio.mmdevice.IMMEndpoint#

ベースクラス: IUnknown

GetDataFlow = <COM method offset 3: WinFunctionType>#
class powccoreaudio.mmdevice.IMMNotificationClient#

ベースクラス: IUnknown

OnDefaultDeviceChanged = <COM method offset 6: WinFunctionType>#
OnDeviceAdded = <COM method offset 4: WinFunctionType>#
OnDeviceRemoved = <COM method offset 5: WinFunctionType>#
OnDeviceStateChanged = <COM method offset 3: WinFunctionType>#
OnPropertyValueChanged = <COM method offset 7: WinFunctionType>#
class powccoreaudio.mmdevice.MMDevice(o: Any)#

ベースクラス: object

マルチメディアデバイス。IMMDeviceインターフェイスのラッパーです。

activate(iid: GUID, wrapper_type: type[TWrapper], params: PropVariant | None = None, clsctx: int = 7) TWrapper#
activate_audioendpointvolume() AudioEndpointVolume#
activate_audioendpointvolume_nothrow() ComResult[AudioEndpointVolume]#
activate_audiometerinfo() AudioMeterInformation#
activate_audiometerinfo_nothrow() ComResult[AudioMeterInformation]#
activate_audiosystemeffectspropstore(propstore_context: GUID) AudioSystemEffectsPropertyStore#
activate_audiosystemeffectspropstore_nothrow(propstore_context: GUID) ComResult[AudioSystemEffectsPropertyStore]#
activate_nothrow(iid: GUID, wrapper_type: type[TWrapper], params: PropVariant | None = None, clsctx: int = 7) ComResult#
property device_props_readonly: DevicePropertiesReadOnlyInPropertyStore#
property device_props_readonly_nothrow: ComResult[DevicePropertiesReadOnlyInPropertyStore]#
property id: str#
property id_nothrow: ComResult[str]#
open_propstore(access: StorageMode) PropertyStore#
open_propstore_nothrow(access: StorageMode) ComResult[PropertyStore]#
property propstore_read: PropertyStore#
property propstore_read_nothrow: ComResult[PropertyStore]#
property propstore_readwrite: PropertyStore#
property propstore_readwrite_nothrow: ComResult[PropertyStore]#
property state: DeviceState#
property state_nothrow: ComResult[DeviceState]#
property wrapped_obj: c_void_p#
class powccoreaudio.mmdevice.MMDeviceCollection(o: Any)#

ベースクラス: object

マルチメディアデバイスコレクション。IMMDeviceCollectionインターフェイスのラッパーです。

getat(index: int) MMDevice#

インデックスを指定して項目を取得します。 キーが整数固定なので__getitem__より高速です。

property items: tuple[MMDevice, ...]#
property wrapped_obj: c_void_p#
class powccoreaudio.mmdevice.MMDeviceEnumerator(o: Any)#

ベースクラス: object

マルチメディアデバイスの列挙機能。IMMDeviceEnumeratorインターフェイスのラッパーです。

サンプル

>>> device_enum = MMDeviceEnumerator.create()
CLSID_MMDEVICEENUMERATOR: Final = GUID("{BCDE0395-E52F-467C-8E3D-C4579291692E}")#
static create() MMDeviceEnumerator#
get_default_audioendpoint(flow: DataFlow, role: Role) MMDevice#
get_default_audioendpoint_nothrow(flow: DataFlow, role: Role) ComResult[MMDevice]#
get_device(id: str) MMDevice#
get_device_nothrow(id: str) ComResult[MMDevice]#
get_enum_audioendpoints(flow: DataFlow, role: Role) MMDeviceCollection#
get_enum_audioendpoints_nothrow(flow: DataFlow, role: Role) ComResult[MMDeviceCollection]#
get_microphone() MMDevice#
get_speaker() MMDevice#
property microphones: MMDeviceCollection#
register_endpoint_notification_callback(client: MMNotificationClientBase) MMNotificationClientWrapper#
register_endpoint_notification_callback_nothrow(client: MMNotificationClientBase) ComResult[MMNotificationClientWrapper]#
property speakers: MMDeviceCollection#
unregister_endpoint_notification_callback(wrapper: MMNotificationClientWrapper) None#
unregister_endpoint_notification_callback_nothrow(wrapper: MMNotificationClientWrapper) ComResult[None]#
property wrapped_obj: c_void_p#
class powccoreaudio.mmdevice.MMEndpoint(o: Any)#

ベースクラス: object

マルチメディアエンドポイント。IMMEndpointインターフェイスのラッパーです。

property dataflow_nothrow: ComResult[DataFlow]#
property wrapped_obj: c_void_p#
class powccoreaudio.mmdevice.MMNotificationClientBase#

ベースクラス: object

abstractmethod defaultdevice_changed(flow: DataFlow, role: Role, defaultdeviceid: str | None) int#
abstractmethod device_added(deviceid: str | None) int#
abstractmethod device_removed(deviceid: str | None) int#
abstractmethod device_state_changed(deviceid: str | None, newstate: int) int#
abstractmethod propvalue_changed(deviceid: str | None, key: PropVariant) int#
class powccoreaudio.mmdevice.MMNotificationClientForCall(f: Callable[[str, OrderedDict[str, Any]], None])#

ベースクラス: MMNotificationClientBase

defaultdevice_changed(flow: DataFlow, role: Role, defaultdeviceid: str | None) int#
device_added(deviceid: str | None) int#
device_removed(deviceid: str | None) int#
device_state_changed(deviceid: str | None, newstate: int) int#
propvalue_changed(deviceid: str | None, key: PropVariant) int#
class powccoreaudio.mmdevice.MMNotificationClientForPrint(f: TextIO | None = None)#

ベースクラス: MMNotificationClientForCall

class powccoreaudio.mmdevice.MMNotificationClientWrapper(*args, **kw)#

ベースクラス: COMObject

IMMNotificationClient_OnDefaultDeviceChanged(this, flow: int, role: int, defaultdeviceid: str | None) int#
IMMNotificationClient_OnDeviceAdded(this, deviceid: str | None) int#
IMMNotificationClient_OnDeviceRemoved(this, deviceid: str | None) int#
IMMNotificationClient_OnDeviceStateChanged(this, deviceid: str | None, newstate: int) int#
IMMNotificationClient_OnPropertyValueChanged(this, deviceid: str | None, key: PropVariant) int#
class powccoreaudio.mmdevice.Role(*values)#

ベースクラス: IntEnum

ERole

Communications = 2#
Console = 0#
Multimedia = 1#