SoundPool.LoadAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| LoadAsync(AssetFileDescriptor, Int32) |
Starts a task that calls the asset-descriptor load operation. |
| LoadAsync(String, Int32) |
Starts a task that calls the file-path load operation. |
| LoadAsync(Context, Int32, Int32) |
Starts a task that calls the application-resource load operation. |
| LoadAsync(FileDescriptor, Int64, Int64, Int32) |
Starts a task that calls the descriptor-and-range load operation. |
LoadAsync(AssetFileDescriptor, Int32)
Starts a task that calls the asset-descriptor load operation.
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>
Parameters
The asset descriptor whose file, start offset and declared length are passed to the load operation.
- priority
- Int32
The load-priority argument; on Android API 37.2 it does not determine native decode order.
Returns
A task with the sound identifier returned by the load call, or zero. Sample decoding completes separately through LoadComplete.
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
LoadAsync(String, Int32)
Starts a task that calls the file-path load operation.
public System.Threading.Tasks.Task<int> LoadAsync(string? path, int priority);
member this.LoadAsync : string * int -> System.Threading.Tasks.Task<int>
Parameters
- path
- String
The local audio-file path opened by the load operation.
- priority
- Int32
The load-priority argument; on Android API 37.2 it does not determine native decode order.
Returns
A task with the sound identifier returned by the load call, or zero. Sample decoding completes separately through LoadComplete.
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
LoadAsync(Context, Int32, Int32)
Starts a task that calls the application-resource load operation.
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>
Parameters
- context
- Context
The context whose resources are used to open the audio resource.
- resId
- Int32
The raw-resource identifier passed to the resource descriptor lookup.
- priority
- Int32
The load-priority argument; on Android API 37.2 it does not determine native decode order.
Returns
A task with the sound identifier returned by the load call, or zero. Sample decoding completes separately through LoadComplete.
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
LoadAsync(FileDescriptor, Int64, Int64, Int32)
Starts a task that calls the descriptor-and-range load operation.
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>
Parameters
The descriptor of the file containing the sound data.
- offset
- Int64
The sound data's byte offset from the beginning of the file.
- length
- Int64
The number of bytes in the sound-data range.
- priority
- Int32
The load-priority argument; on Android API 37.2 it does not determine native decode order.
Returns
A task with the sound identifier returned by the load call. Sample decoding completes separately through LoadComplete.
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.