0
0

Hi!

I’m currently writing an application in C# that read audio from a huge file (worst case is up to 8GB!). The audio format is raw 16- or 24-bit PCM.

The problem I’m having is that the audio-data is byte-swapped :( and I am looking for an easy way of playing this audio w/o reading the whole file into memory due to its size and with no glitches.

In the end I want to play several streams of audio concurrently (and in sync!) from this huge file that contains multiple pieces of audio. I will also re-code this audio and split it into several files (as wav, mp3, ogg….) so that I can save this/theese audio file(s) to my PC.

Searching thru this forum gave me no hint…

Tnx!
/–rob

  • You must to post comments
0
0

FMod supports overriding file open, close, and read callbacks. Override those, and in the read callback you can do what you need to the data then put it into the buffer for FMod to read from.

  • You must to post comments
0
0

Tnx!

I’ll try experimenting with that…..

Btw. Do I need to set all callbacks in the System::attachFileSystem or is it possible to only set a callback on FMOD_FILE_READCALLBACK. If not how would a proper passthru-callback look like?

But since byte-swap (big-endian, little-endian) is a common(?) scenario I believed that this tool/lib could handle this more easily than hooking into the file operations since it supports i.e. Pocket-PC (SH3 is both-endian!).

Any other suggestions, while I try this piggy-backing approach.

/–rob

  • You must to post comments
0
0

You should use setFileSystem not ‘attach’FileSystem. Please read the docs on the difference between the two more closely.

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.