I am wondering how to get the data decoded by a stream (i.e. if I open an mp3 file, I want the raw PCM data as decoded by FMOD).
I am unable to use samples because the files I decode are fairly large.
I have been able to use FSOUND_Stream_GetSample() to get a sample handle and have also been able to store the result to a file – but I don’t know how much I am to jump forward in the stream when I have written the data to the file. If I use
FSOUND_Stream_SetTime(Stream, FSOUND_Stream_GetTime(Stream) + 400);
the data is not at all contiguous which is what I want to achieve.
(I got 400 from the FMOD documentation somewhere or other).
Any help would be very much appreciated.
- TDLGames asked 11 years ago
I have another question (still related to the previous one):
I have come to the conclusion that I must use samples, but have hit another wall.
I know it is possible to specify the offset in bytes of a file to load and the length of a data segment. But in all the cases I have tried this, FMOD returns null.
My FSOUND_Sample_Load function call looks like this:
FSOUND_SAMPLE* Sample = FSOUND_Sample_Load(FSOUND_FREE, "Test.mp3", 0, 1024, 2048);
[The numbers are randomly selected]
When I try to lock the data I get 0 bytes. What am I doing wrong?
I, as always, look forward to any reply.
- TDLGames answered 11 years ago
Please login first to submit.