0
0

Hi. Evaluating fmod because of problems with competing product .
Problem seems to happen when playing 10 channels simultaneously.
Who is to blame, me, fmod, or conexant (audio drivers)?

This is with 4.06.12, fmodexL.dll, debug build.

I believe my hardware has 10 bands.

Here’s the code:

[code:5r1yeuwg]

include <assert.h>

include <conio.h>

include <stdio.h>

include <stdlib.h>

include "fmod.hpp"

include "fmod_errors.h"

//—————————————————————————–
void ERRCHECK(FMOD_RESULT result)
{
if (result != FMOD_OK)
{
printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result));
getch();
assert(0);
}
}

//—————————————————————————–
void main(void)
{
FMOD_RESULT result;

FMOD::System * system = NULL;
printf(&quot;FMOD::System_Create\n&quot;);
result = FMOD::System_Create(&amp;system);
ERRCHECK(result);

unsigned int version = 0;
printf(&quot;getVersion\n&quot;);
result = system-&gt;getVersion(&amp;version);
ERRCHECK(result);
assert(version == FMOD_VERSION);

printf(&quot;init\n&quot;);
result = system-&gt;init(100, FMOD_INIT_NORMAL, 0);
ERRCHECK(result);

FMOD::Sound * sound = NULL;
printf(&quot;createSound\n&quot;);
result = system-&gt;createSound(&quot;wave.mp3&quot;, FMOD_DEFAULT, 0, &amp;sound);     
ERRCHECK(result);

for (int i = 0; i &lt; 100; i++)
{
    FMOD::Channel * channel = NULL;
    printf(&quot;playSound %d\n&quot;, i);
    result = system-&gt;playSound(FMOD_CHANNEL_FREE, sound, false, &amp;channel);
    ERRCHECK(result);
}

getch();

printf(&quot;release\n&quot;);
result = system-&gt;release();
ERRCHECK(result);

}

[/code:5r1yeuwg]

Here’s the output:

FMOD::System_Create
getVersion
init
createSound
playSound 0
playSound 1
playSound 2
playSound 3
playSound 4
playSound 5
playSound 6
playSound 7
playSound 8
playSound 9
FMOD error! (54) A call to a standard soundcard driver failed, which could possi
bly mean a bug in the driver or resources were missing or exhausted.

Here’s the log:

FMOD: SystemI::init : maxchannels = 100, flags = 00000000, extradriverdata = 00000000
FMOD: SystemI::close :
FMOD: SystemI::close : Shut down streamer and FMOD_NONBLOCKING and FileSystem thread.
FMOD: SystemI::close : Remove all user channel groups.
FMOD: SystemI::close : Remove ‘main’ channel group.
FMOD: SystemI::close : Remove miscllaneous DSP stuff.
FMOD: SystemI::close : done.

FMOD: OutputDSound::init : Register DLL
FMOD: OutputDSound::registerDLL : Detected DIRECTX 9
FMOD: OutputDSound::init : Enumerate Drivers
FMOD: FMOD_Output_DSound_EnumProc : Enumerating "Primary Sound Driver"
FMOD: FMOD_Output_DSound_EnumProc : Enumerating "Conexant AMC Audio"
FMOD: OutputDSound::init : CoInitialize
FMOD: OutputDSound::init : DirectSoundCreate8 : mSelectedDriver = -1
FMOD: OutputDSound::init : SetCooperativeLevel
FMOD: OutputDSound::init : GetCaps
FMOD: OutputDSound::init : Create Primary Buffer
FMOD: OutputDSound::init : Set Primary Buffer Format
FMOD: OutputDSound::init : Getting Listener Interface
FMOD: OutputDSound::initEAX4 : Querying EAX4
FMOD: OutputDSound::createSample : length 1024, channels 1, format 2, mode 00020010
FMOD: OutputDSound::createSample : done
FMOD: OutputDSound::querySupportEAX4 : check properties 00000001
FMOD: OutputDSound::initEAX4 : failed (2).
FMOD: SoundI::release : (null) (0032C1C0)
FMOD: SoundI::release : stopping sound. (0032C1C0)
FMOD: SoundI::release : free this. (0032C1C0)
FMOD: SoundI::release : done (0032C1C0)
FMOD: OutputDSound::initEAX4 : Querying EAX3
FMOD: OutputDSound::createSample : length 1024, channels 1, format 2, mode 00020010
FMOD: OutputDSound::createSample : done
FMOD: OutputDSound::querySupportEAX3 : check properties 00000000
FMOD: OutputDSound::initEAX3 : failed EAX check, releasing reverb interface
FMOD: SoundI::release : (null) (0032C1C0)
FMOD: SoundI::release : stopping sound. (0032C1C0)
FMOD: SoundI::release : free this. (0032C1C0)
FMOD: SoundI::release : done (0032C1C0)
FMOD: OutputDSound::initEAX2 : Querying EAX2
FMOD: OutputDSound::createSample : length 1024, channels 1, format 2, mode 00020010
FMOD: OutputDSound::createSample : done
FMOD: OutputDSound::querySupportEAX2 : check properties 00000000
FMOD: OutputDSound::querySupportEAX2 : success.
FMOD: OutputDSound::querySupportEAX2 : check properties 00000001
FMOD: OutputDSound::querySupportEAX2 : success.
FMOD: OutputDSound::querySupportEAX2 : check properties 0000000B
FMOD: OutputDSound::querySupportEAX2 : success.
FMOD: OutputDSound::querySupportEAX2 : check properties 0000000C
FMOD: OutputDSound::querySupportEAX2 : success.
FMOD: OutputDSound::querySupportEAX2 : check properties 0000000D
FMOD: OutputDSound::querySupportEAX2 : success.
FMOD: OutputDSound::querySupportEAX2 : check properties 00000002
FMOD: OutputDSound::querySupportEAX2 : success.
FMOD: OutputDSound::querySupportEAX2 : check properties 00000003
FMOD: OutputDSound::querySupportEAX2 : success.
FMOD: OutputDSound::querySupportEAX2 : check properties 00000005
FMOD: OutputDSound::querySupportEAX2 : success.
FMOD: OutputDSound::querySupportEAX2 : check properties 00000006
FMOD: OutputDSound::querySupportEAX2 : success.
FMOD: OutputDSound::querySupportEAX2 : check properties 00000007
FMOD: OutputDSound::querySupportEAX2 : success.
FMOD: OutputDSound::querySupportEAX2 : check properties 00000008
FMOD: OutputDSound::querySupportEAX2 : success.
FMOD: OutputDSound::querySupportEAX2 : check properties 00000009
FMOD: OutputDSound::querySupportEAX2 : success.
FMOD: OutputDSound::querySupportEAX2 : check properties 0000000A
FMOD: OutputDSound::querySupportEAX2 : success.
FMOD: OutputDSound::querySupportEAX2 : check properties 0000000E
FMOD: OutputDSound::querySupportEAX2 : success.
FMOD: OutputDSound::querySupportEAX2 : check properties 00000004
FMOD: OutputDSound::querySupportEAX2 : success.
FMOD: OutputDSound::querySupportEAX2 : check properties 0000000F
FMOD: OutputDSound::querySupportEAX2 : success.
FMOD: OutputDSound::initEAX2 : setting reverb environment to OFF
FMOD: OutputDSound::initEAX2 : found!
FMOD: OutputDSound::init : Done
FMOD: SystemI::init : Set up software engine
FMOD: OutputDSound::createSample : length 4096, channels 2, format 2, mode 0000002a
FMOD: OutputDSound::createSample : done
FMOD: Thread::initThread : Initializing FMOD mixer thread. priority 3
FMOD: Thread::initThread : – Stacksize 32768. Stack pointer 00000000 : usesemaphore = 0 : sleeptime = 10
FMOD: Thread::callback : * FMOD mixer thread started
FMOD: Thread::initThread : done.
FMOD: SystemI::init : Set up emulated output
FMOD: SystemI::init : create the channel pool
FMOD: SystemI::init : Set up streamer
FMOD: Thread::initThread : Initializing FMOD stream thread. priority 2
FMOD: Thread::initThread : – Stacksize 32768. Stack pointer 00000000 : usesemaphore = 0 : sleeptime = 10
FMOD: Thread::callback : * FMOD stream thread started
FMOD: Thread::initThread : done.
FMOD: OutputDSound::setPropertiesEAX2 : Entering
FMOD: OutputDSound::setPropertiesEAX2 : setting listener properties
FMOD: OutputDSound::setPropertiesEAX2 : Entering
FMOD: OutputDSound::setPropertiesEAX2 : setting listener properties
FMOD: SystemI::init : done

FMOD: SystemI::createSoundInternal : filename = wave.mp3 : mode 00000000
FMOD: SystemI::createSoundInternal : 19 codecs found. Scan all until one succeeds
FMOD: CodecTag::openInternal : attempting to open ID3 or ASF tags..
FMOD: Codec::release :
FMOD: Plugin::release : (00F77DC8)
FMOD: Plugin::release : done
FMOD: Codec::release :
FMOD: CodecCDDA::openInternal : attempting to open as CDDA..
FMOD: Codec::release :
FMOD: Plugin::release : (00F92740)
FMOD: Plugin::release : done
FMOD: Codec::release :
FMOD: CodecFSB::openInternal : attempting to open as FSB..
FMOD: Codec::release :
FMOD: CodecFSB::closeInternal :
FMOD: CodecFSB::closeInternal : done
FMOD: Plugin::release : (00F92740)
FMOD: Plugin::release : done
FMOD: Codec::release :
FMOD: CodecVAG::openInternal : attempting to open as VAG..
FMOD: CodecVAG::openInternal : ‘VAG’ ID check failed [ÿûp]
FMOD: Codec::release :
FMOD: Plugin::release : (00F92740)
FMOD: Plugin::release : done
FMOD: Codec::release :
FMOD: CodecWav::openInternal : attempting to open as WAV..
FMOD: Codec::release :
FMOD: Plugin::release : (00F92740)
FMOD: Plugin::release : done
FMOD: Codec::release :
FMOD: CodecOggVorbis::openInternal : attempting to open as OGG..
FMOD: CodecOggVorbis::openInternal : failed to open as ogg
FMOD: Codec::release :
FMOD: Plugin::release : (00F92740)
FMOD: Plugin::release : done
FMOD: Codec::release :
FMOD: CodecAIFF::openInternal : attempting to open as AIFF..
FMOD: Codec::release :
FMOD: Plugin::release : (00F92740)
FMOD: Plugin::release : done
FMOD: Codec::release :
FMOD: CodecFLAC::openInternal : attempting to open as FLAC..
FMOD: Codec::release :
FMOD: Plugin::release : (00F92740)
FMOD: Plugin::release : done
FMOD: Codec::release :
FMOD: CodecMOD::openInternal : attempting to open as MOD..
FMOD: CodecMOD::openInternal : ‘M.K.’ etc ID check failed [R—­E]
FMOD: Codec::release :
FMOD: MusicSong::stop :
FMOD: MusicSong::stop : done
FMOD: Plugin::release : (00F92740)
FMOD: Plugin::release : done
FMOD: Codec::release :
FMOD: CodecS3M::openInternal : attempting to open as S3M..
FMOD: CodecS3M::openInternal : ‘SCRM’ ID check failed [FMOD: Codec::release :
FMOD: MusicSong::stop :
FMOD: MusicSong::stop : done
FMOD: Plugin::release : (00F92740)
FMOD: Plugin::release : done
FMOD: Codec::release :
FMOD: CodecXM::openInternal : attempting to open as XM..
FMOD: CodecXM::openInternal : ‘Extended Module: ‘ ID check failed [ÿûpP]
FMOD: Codec::release :
FMOD: MusicSong::stop :
FMOD: MusicSong::stop : done
FMOD: Plugin::release : (00F92740)
FMOD: Plugin::release : done
FMOD: Codec::release :
FMOD: CodecIT::openInternal : attempting to open as IT..
FMOD: CodecIT::openInternal : ‘IMPM’ etc ID check failed [ÿûpP]
FMOD: Codec::release :
FMOD: MusicSong::stop :
FMOD: MusicSong::stop : done
FMOD: Plugin::release : (00F92740)
FMOD: Plugin::release : done
FMOD: Codec::release :
FMOD: CodecMIDI::openInternal : attempting to open as MIDI..
FMOD: CodecMIDI::openInternal : ‘HThd’ ID check failed [ÿûpP]
FMOD: Codec::release :
FMOD: Plugin::release : (00F92740)
FMOD: Plugin::release : done
FMOD: Codec::release :
FMOD: CodecDLS::openInternal : attempting to open as DLS..
FMOD: Codec::release :
FMOD: Plugin::release : (00F92740)
FMOD: Plugin::release : done
FMOD: Codec::release :
FMOD: CodecASF::openInternal : attempting to open as ASF..
FMOD: Codec::release :
FMOD: Plugin::release : (00F92740)
FMOD: Plugin::release : done
FMOD: Codec::release :
FMOD: CodecPlaylist::openInternal : attempting to open playlist file
FMOD: Codec::release :
FMOD: Plugin::release : (00F92740)
FMOD: Plugin::release : done
FMOD: Codec::release :
FMOD: CodecMPEG::openInternal : attempting to open as MPEG..
FMOD: SystemI::createSoundInternal : Format has 0 subsounds.
FMOD: SystemI::createSoundInternal : Create as FMOD_CREATESAMPLE
FMOD: SystemI::createSoundInternal : creating subsound 0/0
FMOD: SystemI::createSample : mode 00000000 length 509184 samples, lengthbytes 138368
FMOD: SystemI::createSample : subsamples = 1, channels = 2
FMOD: SystemI::createSample : subsample 0. output = 0032AC88
FMOD: SystemI::createSample : use hw
FMOD: OutputDSound::createSample : length 509184, channels 2, format 2, mode 00000029
FMOD: OutputDSound::createSample : done
FMOD: SystemI::createSample : done
FMOD: SystemI::createSoundInternal : No name found in file, use filename.
FMOD: SystemI::createSoundInternal : done. OpenState now = FMOD_OPENSTATE_READY. 24643 bytes used

  • You must to post comments
0
0

Well, naturally I am using:

float CSoundSystemFmodex::Get_Cpu_Percentage(void) const
{
float cpu = 0;
FMOD_CHECK_RESULT(PSystem->getCPUUsage(NULL, NULL, NULL, &cpu));
return cpu;
}

  • You must to post comments
0
0

Followup. If I init with maxchannels < 10, all is well.

10 or higher = boom.

100% repeatable.

No error also if I disable hardware acceleration on driver.

I suppose it is a bad audio driver?

Tom

  • You must to post comments
0
0

That function doesnt even time ‘FMOD_HARDWARE’ only FMOD_SOFTWARE.

  • You must to post comments
0
0

No response from FMOD or public… I feel discouraged.

Little point in asking my next question about bad performance I suppose.

  • You must to post comments
0
0

Well net result I want is a faster framerate. So if using FMOD_HARDWARE results in lower CPU usage then I’ll presumably get that, right? At the cost of decreased compatibility.

The answers I am getting appear to be dismissive and defensive. Why? I’m just trying to understand how to use this product. This is not a personal attack on FMOD.

Tom

  • You must to post comments
0
0

The problem is with your sound device.

Use FMOD_SOFTWARE flag when loading your and avoid any more driver issues.

  • You must to post comments
0
0

But I wish to ship a product. I don’t want to use FMOD_SOFTWARE unless I have to.

How do most people handle bad audio drivers? How common is my sort of problem?

  • Ignore certain errors?
  • If certain errors are detected, switch to FMOD_SOFTWARE ?
  • Provide a user option to use software?

Tom

  • You must to post comments
0
0

I think I read in another post about software being faster than hardware. I know using software means more of the FMOD clever stuff works.

  • You must to post comments
0
0

There is no advantage of using FMOD_HARDWARE to play sounds , only disadvantages – driver bugs being the biggest one. Some games use ‘hardware’ (thats the thing you dont even know if it is really hardware half of the time) – so yes i recommend usually that they offer an option in the game settings with user friendly names like ‘compatible’ (software) and ‘accelerated’ (hardware) – even though ‘accelerated’ is a misnomer. It is not faster than software.

  • You must to post comments
0
0

I just conducted a test of the difference for total CPU usage.
This is for a 3D environment with 100 objects moving around and shooting. The results are repeatable.

Results:

My XP system with buggy audio drivers:
hardware: 15% CPU
software: 5% CPU

My new Vista system:
hardware: 2.3% CPU
software: 4.5% CPU

So there does seem to be an advantage to using hardware on my Vista. Although I have not discussed audio quality…

Any comment?

Tom

  • You must to post comments
0
0

There is no such thing as hardware support on vista.

  • You must to post comments
0
0

Then how to explain the CPU differential?

Tom

  • You must to post comments
0
0

you havent exactly given any details on how you’re doing the test or how you’re measuring it – if you’re using task manager to guage cpu usage then that is hardly an accurate method. FMOD’s mixer is very fast and though its possible the directsound emulation mixer is faster its probably because it is only doing 16bit stereo mixing vs 5.1 floating point mixing like fmod – there are a number of factors to consider in a proper test.

  • You must to post comments
Showing 13 results
Your Answer

Please first to submit.