語言

SoundPool.LoadAsync 方法

定義

多載

名稱 Description
LoadAsync(AssetFileDescriptor, Int32)

啟動一項任務,呼叫資產描述符載入操作。

LoadAsync(String, Int32)

啟動一個任務,呼叫檔案路徑載入操作。

LoadAsync(Context, Int32, Int32)

啟動一個任務,呼叫應用程式資源載入操作。

LoadAsync(FileDescriptor, Int64, Int64, Int32)

啟動一個任務,呼叫描述符與範圍載入操作。

LoadAsync(AssetFileDescriptor, Int32)

啟動一項任務,呼叫資產描述符載入操作。

public System.Threading.Tasks.Task<int> LoadAsync(Android.Content.Res.AssetFileDescriptor? afd, int priority);
member this.LoadAsync : Android.Content.Res.AssetFileDescriptor * int -> System.Threading.Tasks.Task<int>

參數

afd
AssetFileDescriptor

資產描述符的檔案、起始偏移量與宣告長度會傳遞給載入操作。

priority
Int32

載入優先權論證;在 Android API 37.2 中,它不會決定原生解碼順序。

傳回

載入呼叫回傳的聲音識別碼任務,或為零。 樣本解碼則分別完成,透過 LoadComplete。

備註

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

LoadAsync(String, Int32)

啟動一個任務,呼叫檔案路徑載入操作。

public System.Threading.Tasks.Task<int> LoadAsync(string? path, int priority);
member this.LoadAsync : string * int -> System.Threading.Tasks.Task<int>

參數

path
String

載入操作開啟的本地音訊檔案路徑。

priority
Int32

載入優先權論證;在 Android API 37.2 中,它不會決定原生解碼順序。

傳回

載入呼叫回傳的聲音識別碼任務,或為零。 樣本解碼則分別完成,透過 LoadComplete。

備註

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

LoadAsync(Context, Int32, Int32)

啟動一個任務,呼叫應用程式資源載入操作。

public System.Threading.Tasks.Task<int> LoadAsync(Android.Content.Context? context, int resId, int priority);
member this.LoadAsync : Android.Content.Context * int * int -> System.Threading.Tasks.Task<int>

參數

context
Context

使用其資源開啟音訊資源的上下文。

resId
Int32

原始資源識別碼會傳遞給資源描述符查詢。

priority
Int32

載入優先權論證;在 Android API 37.2 中,它不會決定原生解碼順序。

傳回

載入呼叫回傳的聲音識別碼任務,或為零。 樣本解碼則分別完成,透過 LoadComplete。

備註

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

LoadAsync(FileDescriptor, Int64, Int64, Int32)

啟動一個任務,呼叫描述符與範圍載入操作。

public System.Threading.Tasks.Task<int> LoadAsync(Java.IO.FileDescriptor? fd, long offset, long length, int priority);
member this.LoadAsync : Java.IO.FileDescriptor * int64 * int64 * int -> System.Threading.Tasks.Task<int>

參數

fd
FileDescriptor

包含聲音資料的檔案描述符。

offset
Int64

聲音資料的位元組偏移與檔案開頭。

length
Int64

聲音資料範圍內的位元組數。

priority
Int32

載入優先權論證;在 Android API 37.2 中,它不會決定原生解碼順序。

傳回

一個由載入呼叫回傳的聲音識別碼任務。 樣本解碼則分別完成,透過 LoadComplete。

備註

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於