0
0

Hi!
As noted in the FMOD API documentation, this peace of code gets the min and max frequency that the sound hardware can cope with. Is there some way to get the min/max frequency in a cross platform way that anyone is aware of?

[code:10320moa]
include <dsound.h>

int minhwfreq, maxhwfreq;

if (FSOUND_GetNumHardwareChannels() && FSOUND_GetOutput() == FSOUND_OUTPUT_DSOUND)
{
HRESULT hr;
DSCAPS dscaps;
memset(&dscaps, 0, sizeof(DSCAPS));
dscaps.dwSize = sizeof(DSCAPS);
hr = IDirectSound_GetCaps((LPDIRECTSOUND)FSOUND_GetOutputHandle(), &dscaps);
minhwfreq = dscaps.dwMinSecondarySampleRate;
maxhwfreq = dscaps.dwMaxSecondarySampleRate;
}
[/code:10320moa]

  • You must to post comments
0
0

If you use FMOD Ex it gives you this information, though virtually no other platform supports hardware, it always drops back to software mixing.

  • You must to post comments
0
0

Alright, then I solve it with a simple #ifdef WIN32 for now.

Thanks for the quick response!

Regards
Björn L

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.