0
0

Is it possible to do [b:wdkz3jgh]decoding[/b:wdkz3jgh] of any audio stream/file without playing it?

eg: during playback of an mp3 audio file, another thread decodes a different mp3 audio file for analysis….

thx for help

  • You must to post comments
0
0

It is up to you to create a thread for the analysis process, FMOD can handle multiple stream @ once.
Take care of mutual exclusion and globals vars (see multithread related programming sites)

  • You must to post comments
0
0

Thx for this information… so generally it works.. fine.. but what when analysing huge mp3-files like mix-cd’s – FSOUND_Sample_Load() would take a huge amount of memory when it decodes the complete stream into memory… is there another way to decode a file chunk by chunk during playback of another stream/file/url ?!?

look: i wrote a player who is able to play files during burning process and other analysis functions during playback… fsound can only started once (i think) so i would be nice to open streams and call a function like:
FSOUND_Stream_Read(&buf, sizeof(buf), stream)

thx again for help

  • You must to post comments
0
0

[quote="brett":1ykly4c4]fmod is an audio playback library not a decompression library. If you want there are hack ways to do it, like dynamically loading another copy of fmod and starting it in nosound/nonrealtime mode, but we’re not adding ‘decode’ functions to fmod3.
regards,[/quote:1ykly4c4]

ok, i understand that point.. but this couldnt be used just for burning/decoding purposes. when i start playback of a stream, opened not with FSOUND_MPEGACCURATE, i would be nice to do a read ahead (of the complete stream, without changing positions of the playback cursor). it could be used to do pre-volume analysis or for finding the cross-over point (fadeout point), to do visuals with it (show what kind of wave to come ahead like in traktor) or just to calculate the correct length of a VBR mp3 audio…..

and decoding only would not be to hard to implement….

anyway a mega compliment to the authors of fmod… this library really rocks! until now there is not much against using fmod in our program!

  • You must to post comments
0
0

hi

for your problem with decoding:
if you are using windows, then you could decode your music-files with the ACM API of MS. it´s very quick and easy to handle.

Nachtschatten

  • You must to post comments
0
0

[quote="Nachtschatten":2r5px8jb]hi

for your problem with decoding:
if you are using windows, then you could decode your music-files with the ACM API of MS. it´s very quick and easy to handle.

Nachtschatten[/quote:2r5px8jb]

at the moment we are using a stand alone mp3 decoder, ogg vorbis decoder and so on…. i never give the api of MS a try… but if it is good enough for analysis in background (volume adjustment etc.) it would fit.. a fallback will be that ms api does not allow the same formats then fmod.. so sometimes i will not be able to do analysis OR i will disallow some formats (where there is no seperate decoding engine for).

it could be so easy if….. but….. ok…. ms api… -> can you post a little code snip just for opening/reading/closing a file? would be cool to take a look on it…

  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.