Fix error when loading embedded audio.
`loadAudioBuffer` skipped actually creating an `AudioBuffer`. Oops! Fortunately, `getAudioBuffer` works fine, so I copied that code.
This commit is contained in:
@@ -464,7 +464,7 @@ class AssetLibrary
|
|||||||
}
|
}
|
||||||
else if (classTypes.exists(id))
|
else if (classTypes.exists(id))
|
||||||
{
|
{
|
||||||
return Future.withValue(Type.createInstance(classTypes.get(id), []));
|
return Future.withValue(AudioBuffer.fromBytes(cast(Type.createInstance(classTypes.get(id), []), Bytes)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user