0
0

Hello

Couldn’t find any answers to my special question.

I need to recort in non realtime mode and have it record X number of seconds of the files that will be played.

Any ideas how to pull this off? FMOD_System_GetRecordPosition returns PCM, can I convert this value to ms?

Thanks

  • You must to post comments
0
0

Thank you very much Brett! Very clear now, "wavwriter has nothing to do with recording" <- that what I thought and got me confused

  • You must to post comments
0
0

No one has any idea for a solution to this problem?
Thought someone should have encountered this before.

  • You must to post comments
0
0

Look at the ‘basics / terminology’ tutorial in the documentation, it is the very first one.

  • You must to post comments
0
0

Ah! dang

Googled like crazy for pcm to ms and there it is… 😀

Saved my life again brett thanks

  • You must to post comments
0
0

I had some issues, I hope someone can spot if I’ve made any misstakes.

Problem is the recording is realtime – not NRT
Also, getrecordposition always returns 0 for some strange reason.

The output file is working 100%

[code:2fmr1ecp]result = FMOD_System_Create(&fmodsystem);
ERRCHECK(result);
result = FMOD_System_SetOutput(fmodsystem, FMOD_OUTPUTTYPE_WAVWRITER_NRT);
ERRCHECK(result);
result = FMOD_System_Init(fmodsystem, 32, FMOD_INIT_NORMAL, "C:\test.wav");
ERRCHECK(result);
result = FMOD_System_CreateSound(fmodsystem, soundpath, FMOD_SOFTWARE | FMOD_CREATESTREAM | FMOD_ACCURATETIME |FMOD_2D, 0, &sound);
ERRCHECK(result);
result = FMOD_System_PlaySound(fmodsystem, FMOD_CHANNEL_FREE, sound, 0, &channel);
ERRCHECK(result);
result = FMOD_Channel_IsPlaying(channel, &playing);
while(playing == 1) {
result = FMOD_System_Update(fmodsystem);
result = FMOD_Channel_IsPlaying(channel, &playing);
FMOD_System_GetRecordPosition(fmodsystem, &recordpos);
Sleep(20);
}[/code:2fmr1ecp]

  • You must to post comments
0
0

Here’s a very simple program I did just to test if I understand how wavwriter_NRT is suppose to be launched and managed. and no doesnt seem like I get it. Still realtime, and output from position is 0
as before the output file works great.

Could anyone please point me in the right direction?

[code:3czvio82]#include <windows.h>

include <stdlib.h>

include <string.h>

include <stdio.h>

include <fmod.h>

include <fmod_errors.h>

FMOD_SYSTEM *fmodsystem;
FMOD_SOUND *sound;
FMOD_CHANNEL *channel;
FMOD_RESULT result;

int main()
{
int playing;
unsigned int recordpose;
result = FMOD_System_Create(&fmodsystem);
result = FMOD_System_SetOutput(fmodsystem, FMOD_OUTPUTTYPE_WAVWRITER_NRT);
result = FMOD_System_Init(fmodsystem, 32, FMOD_INIT_STREAM_FROM_UPDATE, "C:\test.wav");
result = FMOD_System_CreateSound(fmodsystem, "C:\WINDOWS\Media\Windows XP Logoff Sound.wav", FMOD_HARDWARE, 0, &sound);

result = FMOD_System_PlaySound(fmodsystem, FMOD_CHANNEL_FREE, sound, 0, &amp;channel);

result = FMOD_Sound_SetMode(sound, FMOD_LOOP_OFF);
result = FMOD_System_RecordStart(fmodsystem, sound, 0);
result = FMOD_Channel_IsPlaying(channel, &amp;playing);
while(playing == 1) {
    FMOD_System_GetRecordPosition(fmodsystem, &amp;recordpose);
    result = FMOD_System_Update(fmodsystem);
    result = FMOD_Channel_IsPlaying(channel, &amp;playing);
    printf(&quot;%u\n&quot;,recordpose);
    Sleep(20);  
}
result = FMOD_System_RecordStop(fmodsystem);
result = FMOD_Channel_Stop(channel);
result = FMOD_System_Close(fmodsystem);
result = FMOD_System_Release(fmodsystem);

return 0;

}[/code:3czvio82]

  • You must to post comments
0
0

Anyone?

Can’t find any samples how this non realtime is supposed to be set up.

  • You must to post comments
0
0

I’m not sure why you have references to record in there. You can’t record in non real time, unless you have some sort of space/reality distortion field around you :)

The output wont capture if you use FMOD_HARDWARE. You have to use FMOD_SOFTWARE for that.

  • You must to post comments
0
0

Does FMOD set it to software by default if I set it to record? I see in the examples it hasnt been set to software.

I’m a bit confused now :) you wrote I can’t record in non realtime – you mean in the way I’m playing the sound or all together?

I had read this post http://52.88.2.202/forum/viewtopic.php … onrealtime and thought it was just that easy.

  • You must to post comments
0
0

No you have to use FMOD_SOFTWARE specifically. In the future we are going to drop hardware support and it will be default, but this is the way it is now.

Recording is you speaking into a microphone. How do you expect you can do that ‘non realtime’?

If you just want to play a sound, and have it output through the wavwriter output then that is nothing to do with recording, and remove all calls to any recording API, you don’t need it.

Just init, load, play, call update regularly, then close/release and it will work.

  • You must to post comments
Showing 10 results
Your Answer

Please first to submit.