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事件,每當音訊播放軌新增至專案時,就會引發此事件。