0
0

hi, i hope somebody (bret) will help me

i have a segmentation fault when my Start_record function is executed
on my linux system (mandrake distrib)
the same piece of code work very well on win32 so it seems to be a compatibility problem

my function is :

//FMOD_init()

void Start_Record()
{
if (FSOUND_GetOutput() == FSOUND_OUTPUT_OSS)
{
samp1 = FSOUND_Sample_Alloc(FSOUND_UNMANAGED, RECORDLEN, FSOUND_MONO | FSOUND_8BITS | FSOUND_UNSIGNED, RECORDRATE, 255, 128, 255);
}
else
{
samp1 = FSOUND_Sample_Alloc(FSOUND_UNMANAGED, RECORDLEN, FSOUND_STEREO | FSOUND_16BITS , RECORDRATE, 255, 128, 255);
}

FSOUND_Sample_SetMode(samp1, FSOUND_LOOP_NORMAL);   /* make it a looping sample */

    if (!FSOUND_Record_StartSample(samp1, TRUE))    /* start recording and make it loop also */
{
printf("Error!\n");
printf("%s\n", FMOD_ErrorString(FSOUND_GetError()));

FSOUND_Close();
}
/*
    Increase this value if the sound sounds corrupted or the time between recording
    and hearing the result is longer than it should be..
*/
#define RECORD_DELAY_MS       25
#define RECORD_DELAY_SAMPLES  (RECORDRATE * RECORD_DELAY_MS / 1000)


channel = FSOUND_PlaySound(FSOUND_FREE, samp1); /* play the sound */

originalfreq = FSOUND_GetFrequency(channel);


while (!FSOUND_Record_GetPosition()) 
{
    Sleep(1);
}

}

the seg fault appears on the “if (!FSOUND_Record_StartSample(samp1, TRUE))” line
i ve checked all used function and they re supposed to be linux compatible

If somebody have an idea
Thanks a lot

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.