Files
XCEngine/docs/api/resources/audio-loader/get-supported-extensions.md
ssdfasd 1797e7fe17 fix: encapsulate OpenGL types in VertexAttribute to eliminate raw GL API usage in tests
- Add VertexAttributeType and VertexAttributeNormalized enums in OpenGLVertexArray.h
- Add ToGLAttributeType() converter in OpenGLVertexArray.cpp
- Remove glActiveTexture() call from quad test (already handled by texture.Bind())
- Remove #include <glad/glad.h> from triangle test
- Update unit tests to use encapsulated enums

All three OpenGL integration tests (minimal, triangle, quad) pass with 0% pixel difference.
2026-03-22 14:33:57 +08:00

960 B

AudioLoader::GetSupportedExtensions

方法签名

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 (旧版扩展名)

示例

AudioLoader loader;
Array<String> extensions = loader.GetSupportedExtensions();

for (const auto& ext : extensions) {
    printf("Supported: %s\n", ext.CStr());
}
// 输出: wav, ogg, mp3, flac, aiff, aif