[b:atumg0yu]1- Is there a maximum raccomanded size for samples?[/b:atumg0yu]
The point is that I would like to try recording and I need a sample.
Now, to get advantage of FMOD ‘looped’ recording, I need to use a ‘big’ fmod sample which contains ‘many’ application samples.

Say fmod will have to allocate a 2sec sample. Every 1/2 sec, the app will [i:atumg0yu]lock[/i:atumg0yu] a part of the sample, pull it out from FMOD (I guess it will be PCM and I can do it thuru the [i:atumg0yu]**ptr1[/i:atumg0yu] parameter of [i:atumg0yu]FSOUND_Sample_Lock[/i:atumg0yu]), pass it to the application-stage recording and [i:atumg0yu]unlock[/i:atumg0yu] the part of the buffer.

[b:atumg0yu]2- Is this correct?[/b:atumg0yu]
Sure, very bad things will happen if I won’t be able to do the app-stage processing before the whole thing wraps up but this can be easily avoided with some user-tweaking and I don’t want to care right now.

[b:atumg0yu]3- What exactly [i:atumg0yu]lock[/i:atumg0yu] means?[/b:atumg0yu]
Do FMOD skip writing on the locked area? Will it stop writing at all?

The documentation about [i:atumg0yu]FSOUND_Sample_Lock[/i:atumg0yu] says: “For PCM based samples, data must be 8 or 16bit”. Sorry, I feel I missed something. This means that FMOD-recorded samples contains PCM 8 or 16 bit samples? Sure, depending on the parameters passed to [i:atumg0yu]FSOUND_Sample_Alloc[/i:atumg0yu] i think. However,
[b:atumg0yu]4- What will happen if I ask for a compressed format such as FSOUND_XADPCM?[/b:atumg0yu]

[b:atumg0yu]5- How to control recording sample rate?[/b:atumg0yu] [i:atumg0yu]FSOUND_Record_StartSample[/i:atumg0yu] does not take this in account so I guess it’s a sample proprity…

[b:atumg0yu]6- What will happen if the sample rate requested for recording is not supported?[/b:atumg0yu] Will [i:atumg0yu]FSOUND_Record_StartSample[/i:atumg0yu] fail or try the nearest rate avaiable?

[b:atumg0yu]7- Is the ret value from FSOUND_Record_GetPosition in bytes or in samples?[/b:atumg0yu] Bytes would be more straightfoward but samples also makes sense.

[b:atumg0yu]8- What is the meaning of [i:atumg0yu]defvol[/i:atumg0yu], [i:atumg0yu]defpan[/i:atumg0yu], [i:atumg0yu]defpri[/i:atumg0yu] in the [i:atumg0yu]FSOUND_Sample_Alloc[/i:atumg0yu] call when this is used to create a recording-only sample?[/b:atumg0yu]

I guess it’s enough right now. Thank you!

  • You must to post comments
  1. FMOD won’t compress data. Sample_Lock will always give you raw pcm data. I guess the Sample_Alloc call will fail or just disregard it if you request a compressed format, but I haven’t checked.

  2. “FSOUND_Record_StartSample
    Starts recording into a predefined sample using the sample’s default playback rate as the recording rate”
    => You can specify the default sampling frequency with Sample_Alloc or later with Sample_SetDefaults(…)

  3. It is in samples. This can be seen in the record sample where the return value of Record_GetPosition is tested against 5*44100. (no of samples for 5secs at 44khz)

  • You must to post comments

I guess I got it. Thanks!

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.