AudioTrack.OpenFailed 事件
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
当 AudioTrack 无法打开时发生。
// Register
event_token OpenFailed(TypedEventHandler<AudioTrack, AudioTrackOpenFailedEventArgs const&> const& handler) const;
// Revoke with event_token
void OpenFailed(event_token const* cookie) const;
// Revoke with event_revoker
AudioTrack::OpenFailed_revoker OpenFailed(auto_revoke_t, TypedEventHandler<AudioTrack, AudioTrackOpenFailedEventArgs const&> const& handler) const;
public event TypedEventHandler<AudioTrack,AudioTrackOpenFailedEventArgs> OpenFailed;
function onOpenFailed(eventArgs) { /* Your code */ }
audioTrack.addEventListener("openfailed", onOpenFailed);
audioTrack.removeEventListener("openfailed", onOpenFailed);
- or -
audioTrack.onopenfailed = onOpenFailed;
Public Custom Event OpenFailed As TypedEventHandler(Of AudioTrack, AudioTrackOpenFailedEventArgs)
事件类型
Windows 要求
设备系列 |
Windows 10 Anniversary Edition (在 10.0.14393.0 中引入)
|
API contract |
Windows.Foundation.UniversalApiContract (在 v3.0 中引入)
|
注解
在 MediaPlaybackItem 的 AudioTracksChanged 事件处理程序中注册 AudioTrack 的 OpenFailed 事件,每当将音频曲目添加到该项时,该事件将引发该事件。