How to use SampleImport ogg?
Posted: Tue Apr 22, 2025 10:24 pm
I've been trying to test ZPlatform_Android.pas ReadAssetFile on Android, but I'm stuck.
ReadAssetFile is specific to Android and is called by Platform_ReadFile.
Which is used by ZClasses.pas TZInputStream.CreateFromFile
So in the end, I was trying to read an ogg file. And I'm a bit stuck. Is that how it works?
I downloaded the ogg from here: https://file-examples.com/index.php/sam ... -download/
But when I import it, the Sample.length is INF
And the ogg sound isn't playing.
What am I doing wrong?
ReadAssetFile is specific to Android and is called by Platform_ReadFile.
Which is used by ZClasses.pas TZInputStream.CreateFromFile
So in the end, I was trying to read an ogg file. And I'm a bit stuck. Is that how it works?
Code: Select all
<?xml version="1.0" encoding="iso-8859-1" ?>
<ZApplication Name="App" Caption="ogg reader" FileVersion="2">
<OnLoaded>
<PlaySound Sound="SoundOGG"/>
</OnLoaded>
<Content>
<Sample Name="SampleOGG" Length="INF">
<Producers>
<SampleImport Comment="Imported from file_example_OOG_1MG.ogg" SampleFormat="1" SampleFileFormat="1"/>
</Producers>
</Sample>
<Sound Name="SoundOGG" Sample="SampleOGG"/>
</Content>
</ZApplication>
But when I import it, the Sample.length is INF
And the ogg sound isn't playing.
What am I doing wrong?