0
0

Hi to all,
I noticed that fmog give informations about a sound and these informations are different from what I get from audacity on the same file.
For example I load a file x with fmod.
the following code:
[code:267s7qj4]bool SoundData::loadSoundData( QString soundName_ )
{
FMOD_RESULT result;

result = AudioDevice::getInstance()->getSystem()->createSound( soundName_.toAscii().data(), FMOD_CREATESAMPLE | FMOD_SOFTWARE, 0, &m_Sound );

if(!m_Sound )
    return false;

m_Samplerate = AudioDevice::getInstance()->GetSampleRate();
result = m_Sound->getFormat( &m_SoundType, &m_SoundFormat, &m_Channels, &m_Bits );

std::cout << "Sound type: " << m_SoundType 
    << "\nsample format: " << m_SoundFormat
    << "\nchannels: " << m_Channels 
    << "\nbits per channel: " << m_Bits
    << "\nsample rate: " << m_Samplerate
    << "\n";


return true;

}[/code:267s7qj4]

give to me the following informations:
[list:267s7qj4]sound type: MPEG -> OK
sound format: PCM16 -> ??
channels: 1 -> OK
bits per channel: 16 ->???
sample rate: 48000 -> ???[/list:u:267s7qj4]

The same file loaded with Audacity give to me this:
[list:267s7qj4]Mono -> OK
16000Hz -> ??????
32 bit float -> ????[/list:u:267s7qj4]

The only thing they have in commun is the number of channels, the rest is different
Why I get these differences loading the same file?
For example I noticed that with files that audacity considere at 44100, fmod give 48000

Can I have an explanation? I’m a bit confused

Best Regards,
Franco

  • You must to post comments
0
0

Hi,

I’ve used Audacity too, so I see the same things you are seeing. As far as I can tell, Audacity decodes the file into a 32 bit Float format, which you would be able to edit. FMOD’s 16 bits and PCM16 basically give you the same general information about the decoded output – it’s 16 bit audio, in PCM format. The 16000hz is the frequency of the file. I believe that the 48000 hz is the sample rate of the mixer. You should try the FMOD function getFrequency to get the frequency of the file instead.

  • George
  • You must to post comments
0
0

[quote="CuriousG":1xmvhasz]Hi,

I’ve used Audacity too, so I see the same things you are seeing. As far as I can tell, Audacity decodes the file into a 32 bit Float format, which you would be able to edit. FMOD’s 16 bits and PCM16 basically give you the same general information about the decoded output – it’s 16 bit audio, in PCM format. The 16000hz is the frequency of the file. I believe that the 48000 hz is the sample rate of the mixer. You should try the FMOD function getFrequency to get the frequency of the file instead.

  • George[/quote:1xmvhasz]

Sorry but what do you mean with "frequency of the file"? An audio file contains lots of frequencies

Franco

  • You must to post comments
0
0

Sorry, by frequency I meant sample rate of the file.

  • George
  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.