0
0

Hi
There are two things which I can’t understand in "recordtodisk" example.
The first one :
[code:2i4m4euh]
exinfo.numchannels = 2;
exinfo.format = FMOD.SOUND_FORMAT.PCM16;
exinfo.defaultfrequency = 44100;
exinfo.length = (uint)(exinfo.defaultfrequency * 2 * exinfo.numchannels * 2);
[/code:2i4m4euh]
The question is about exinfo.length. We multiply the frequency by 2, becouse we have 16bit/sample instead of 8bit/sample – ok i get it. Then we multiply it by 2, becouse we have 2 channels – ok i get it. But why do we have to multiply it again by 2 – I don’t get it. Please enlighten me, why it shouldn’t look like this
[code:2i4m4euh]
exinfo.length = (uint)(exinfo.defaultfrequency * 2 * exinfo.numchannels );
[/code:2i4m4euh]

The second question is how should exinfo.length and sound.@lock look like if i had these parameters:
[code:2i4m4euh]
exinfo.numchannels = 1;
exinfo.format = FMOD.SOUND_FORMAT.PCM24;
exinfo.defaultfrequency = 44100;
[/code:2i4m4euh]

I would be very greatful for any help.

  • You must to post comments
0
0

[code:1rv6syge] exinfo.length = exinfo.defaultfrequency * sizeof(short) * exinfo.numchannels * 2;[/code:1rv6syge]

is what I see…

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.