0
0

Hi

I using the new FMOD Ex, congratulations is great!!! ๐Ÿ˜€

I have a problem to load song files (MOD/S3M/XM/IT), when try to load it
with FMOD_System_LoadSound this return the FMOD_ERR_MEMORY error, actually FMOD Ex not support this format files?

Bye

  • You must to post comments
0
0

Well MODs and MIDs are small enough to preload in memory so that’s logical. My last comment was referring to preloading WAV files and large data files.

  • You must to post comments
0
0

Hi

this is the code:

// globals
FMOD_SYSTEM snd_system;
FMOD_SOUND *sng;

FMOD_RESULT res;

// LOAD_SONG
int Load_Song(const char *fname, int loop)
{

FMOD_MODE mode;

mode = FMOD_2D | FMOD_SOFTWARE | FMOD_ACCURATETIME;
mode |= (loop) ? (FMOD_LOOP_NORMAL) : (FMOD_LOOP_OFF);

res = FMOD_System_CreateSound(snd_system,
fname,
mode,
0,
&sng);
if(res != FMOD_OK) {
GetError(res);
return 0;
}

return 1;
}

GetError put the Error 33 – FMOR_ERR_MEMORY

Bye

  • You must to post comments
0
0

thanks for the explanation brett, thought that FMOD 3 entirely loaded the songs in memory but I see that it is not so and FMOD Ex works equal to FMOD 3

  • You must to post comments
0
0

hi

I have read

I don’t want to load the music as stream, but I desire to entirely load it in memory

Yes with FMOD_System_CreateStream this work, but it is not what I desire, this not load the entire song into memory no?

  • You must to post comments
0
0

[quote="brett":5p0egqw8][quote="Tringi":5p0egqw8][quote="brett":5p0egqw8]Ok i’m changing mod/s3m/xm/it/midi to load as a stream by default now, even if createSound is used, so I dont get more reports like this. [/quote:5p0egqw8]

This sounds like a nonsense to me.
Instead of loading songs as streams, decoder could check if it has already been on the same order/row to detect loop. If it does, just set loop points.

AFAIK Some feature of the FMOD already count with loops in songs.[/quote:5p0egqw8]

Excuse me , fmod ex already does this if you use FMOD_ACCURATETIME, otherwise the length is 0xfffffff.

You dont seem to understand the point of my change. Why on earth would you want to load it into a multi-megabyte decoded pcm buffer? It will take many seconds, and possibly allocate hundreds of megabytes.

If it does this by default, it will just cause many bug reports exactly like the ones in this thread.
Why are people so against it being a stream! It is exactly what FMOD 3 is doing!
This new ‘decode a mod to a wav’ type feature is an extra addition to the functionality.[/quote:5p0egqw8]

Yes I understand why you did that change. Because of dumb users don’t read manual ๐Ÿ˜‰
It seems completely logical to me to load anything longer (not bigger) as stream (or static stream in case of mod/midi). I would always use createStream or the FMOD_CREATESTREAM flag.
I am not against streams, I like them. But I don’t like the idea of breaking the nice simple logic of createSound/createStream with the need to force sample to be sample?

But once the song is being loaded as sample, you can avoid song to take infinite memory by using similar feature as the FMOD_ACCURATETIME uses. You would just stop loading/decoding when loop is detected and set loop points.

  • You must to post comments
0
0

[quote="brett":1vrxdqjr]no, and therefore maybe you ran out of memory? A mod decoded into memory could be huge.[/quote:1vrxdqjr]
Especially if it has an endless loop.

  • You must to post comments
0
0

[quote="CicTec":1n7alpen]sorry i have forgotten a thing

I have 2 songs files that not work correctly with FMOD 4, the first is 2 S3M

the first work correctly on the FMOD3 the second work with problems, all work correctly with others players (ie, WINAMP, ModPlug Traker, etc…)

where do I send you the zip with the songs ?[/quote:1n7alpen]

I also have a few files that play fine in fmod 3, but in fmod ex, one of them doesn’t play at all, and the other sounds quite different (melodies are too soft, bass too loud, etc)

FMOD 3 never had issues with any mod/s3m/it/xm file i played, FMODEX seems to struggle on several of them, yet plays others of them just fine…

BTW I am playing them back with FMOD_System_CreateSound as apposed to FMUSIC_LoadSong, because this allows me to use hardware buffering and plays the music over my surround system as apposed to only front audio.

  • You must to post comments
0
0

Hi

FMOD 3 Load and decode the song into memory no?

  • You must to post comments
0
0

On this topic, while module files DO work for me in FMod Ex, I’m getting lots of playback artifacts. Are modules supposed to be fully working at this point, or are they still in development? I’m getting very strange playback behavior that didn’t occur in FMod 3.

  • You must to post comments
0
0

ok, then FMOD 4 work as FMOD 3 for the songs, ok

NOTE: could you answer to the topic “Questions and request features” that I wrote? thanks :)

  • You must to post comments
0
0

I have downloaded the 4.00.24 beta

if use FMOD_CREATESAMPLE with FMOD_System_CreateSound always return the FMOD_ERR_MEMORY :(

if use FMOD_CREATESAMPLE with FMOD_System_CreateStream work, but I believe that is not planned as flags in this function.

  • You must to post comments
0
0

sorry i have forgotten a thing

I have 2 songs files that not work correctly with FMOD 4, the first is 2 S3M

the first work correctly on the FMOD3 the second work with problems, all work correctly with others players (ie, WINAMP, ModPlug Traker, etc…)

where do I send you the zip with the songs ?

  • You must to post comments
0
0

[quote="brett":3udi2ono]Ok i’m changing mod/s3m/xm/it/midi to load as a stream by default now, even if createSound is used, so I dont get more reports like this. [/quote:3udi2ono]

This sounds like a nonsense to me.
Instead of loading songs as streams, decoder could check if it has already been on the same order/row to detect loop. If it does, just set loop points.

AFAIK Some feature of the FMOD already count with loops in songs.

  • You must to post comments
0
0

[quote="brett":2ycg1lrj]Why are people so against it being a stream! It is exactly what FMOD 3 is doing!
This new ‘decode a mod to a wav’ type feature is an extra addition to the functionality.[/quote:2ycg1lrj]
I guess that’s because those people don’t understand streams well enough. When you think carefully, loading a whole file into memory, even for wav/mp3/ogg, rarely make sense unless you’re planning to manipulate the raw pcm data in a non-linear way (i.e.: not just applying a filter as the file is played back; that can be done in real-time with a stream) or save your changes to the raw pcm data.

Preloading large (10+ MB) files even when it is unnecessary is a sick legacy of the DOS days when computers had much less horsepower to spare and DMA + MultiThreading on PCs were still unheard of.

Go streams.

EDIT : Cictec, if you want an analogy why it doesn’t (usually) make sense to decode a whole .mod into memory, think of it like you were playing a MMORPG and you had to download whole areas of the game, including other players data standing in that area before you could play. Since the players data can change, you would spend an endless time downloading and would never get to play the game.

  • You must to post comments
Showing 14 results
Your Answer

Please first to submit.