docs: update resources API docs
This commit is contained in:
38
docs/api/resources/audio-loader/getsupportedextensions.md
Normal file
38
docs/api/resources/audio-loader/getsupportedextensions.md
Normal file
@@ -0,0 +1,38 @@
|
||||
# AudioLoader::GetSupportedExtensions
|
||||
|
||||
## 方法签名
|
||||
|
||||
```cpp
|
||||
Containers::Array<Containers::String> GetSupportedExtensions() const override;
|
||||
```
|
||||
|
||||
## 详细描述
|
||||
|
||||
返回此加载器支持的所有音频文件扩展名。扩展名列表用于 `ResourceManager` 确定给定文件应由哪个加载器处理。
|
||||
|
||||
## 返回值
|
||||
|
||||
返回 `Containers::Array<Containers::String>`,包含所有支持的扩展名小写形式。
|
||||
|
||||
**支持的格式:**
|
||||
|
||||
| 扩展名 | 格式 |
|
||||
|--------|------|
|
||||
| `wav` | WAV (Waveform Audio File Format) |
|
||||
| `ogg` | OGG (Ogg Vorbis) |
|
||||
| `mp3` | MP3 (MPEG-1 Audio Layer III) |
|
||||
| `flac` | FLAC (Free Lossless Audio Codec) |
|
||||
| `aiff` | AIFF (Audio Interchange File Format) |
|
||||
| `aif` | AIFF (旧版扩展名) |
|
||||
|
||||
## 示例
|
||||
|
||||
```cpp
|
||||
AudioLoader loader;
|
||||
Array<String> extensions = loader.GetSupportedExtensions();
|
||||
|
||||
for (const auto& ext : extensions) {
|
||||
printf("Supported: %s\n", ext.CStr());
|
||||
}
|
||||
// 输出: wav, ogg, mp3, flac, aiff, aif
|
||||
```
|
||||
Reference in New Issue
Block a user