0
0

I am using C# to create a jukebox program and when i go to change tracks i create a new sound for the second track and create it paused and then in my CrossFade() sub i unpause it with channel.setPaused(false).

It works perfectly for a couple of tracks and then returns with the FMOD_ERR_MEMORY error, it can work for 2-12 times and then it will fail

  • You must to post comments
0
0

does it do this if you use FMOD_SOFTWARE for your sounds?

  • You must to post comments
0
0

Since posting this question I have added quite a bit of tracing and some error handling code, and updated to the latest fmod and on my latest build have not yet encountered the problem… I have been running it continuously for 2 and 1/2 hours, with about 40-50 song changes.

If I encounter it again i will change to software to see if it rectifies the problem… Should I be using Software or Hardware in general?

  • You must to post comments
0
0

Ok if you have updated the version it may have been an old bug that was fixed. If it is just for a media player style app you can stick with hardware.
In 3d games I generally recommend software.

  • You must to post comments
0
0

I managed to reproduce this error with the latest version of FMOD, If i watch the memory usage in task manager as i swap songs, because i have to have 2 songs loaded at the same time to cross fade the memory spikes and then when the first song is released it drops back down again, these were the number i was getting up to the crash:
62,684K
118,144K
78,400K
106,816K
53,092K
93,296K
64,880K
120,360K
80,160K
109,128K
53,624K
156,116K

As you can see the last number was the highest and this is where FMOD gave up with the memory error, the track it loaded at this point was a 9.0MB mp3 file….

If i change the mode from HARDWARE to SOFTWARE i can load this same track back to back, and the memory usage jumps to over 229,000K with no memory errors

  • You must to post comments
0
0

if you load that big files, you could probably save a lot of memory if you use the createcompressedsample mode

  • You must to post comments
0
0

I notice CREATECOMPRESSEDSAMPLE mode needs SOFTWARE to be used, so i will stick to SOFTWARE as i am not having any memory errors in that mode, is there anything else i would need to change in my code other than adding that option when i create the sound?

  • You must to post comments
0
0

as this is used for a Music Jukebox running as a Windows Service, i would like the CPU utilization to be as low as possible… I assume that the HARDWARE mode would use a lot less CPU overhead, and if this is the case, i would like to stick to HARDWARE, does anyone know why FMOD would be running out of memory at about 150MB?

  • You must to post comments
0
0

ok now you have to choose:

  • FMOD_HARDWARE:
    Low CPU usage, but huge memory usage, and possibly the pagefile being used as well

  • FMOD_SOFTWARE | FMOD_CREATECOMPRESSEDSAMPLE:
    Slightly higher CPU usage but still extremely low, but low memory usage

I suppose hardware is just faster for effects like EAX and 3D sound, and in your case it’s worth using software

  • You must to post comments
0
0

[quote="FireStorm":1o4yd7pk]ok now you have to choose:

  • FMOD_HARDWARE:
    Low CPU usage, but huge memory usage, and possibly the pagefile being used as well

  • FMOD_SOFTWARE | FMOD_CREATECOMPRESSEDSAMPLE:
    Slightly higher CPU usage but still extremely low, but low memory usage

I suppose hardware is just faster for effects like EAX and 3D sound, and in your case it’s worth using software[/quote:1o4yd7pk]

This is actually incorrect. FMOD’s software engine is a lot faster than directsound’s ‘hardware’ ‘accelleration’. Now that we have our own EAX compatible i3dl2 reverb, there is no reason to use hardware.
The overhead of directsound in a game can hurt framerates a lot more than using fmod’s software mixer (ie for example one case of 60fps dropping to 40fps with hardware, and only 55fps or so with software). Directsound isnt very well designed, and stalls a lot on play/stop because it is actually allocating/freeing memory and stalling on criticalsections every time you play and stop a sound. FMOD’s mixer has none of that.

We may actually be removing hardware support on pc in the future, it is actually becoming pointless. You will see in windows vista there is no hardware 3d acceleration either, Microsoft have dropped it.

  • You must to post comments
Showing 9 results
Your Answer

Please first to submit.