0
0

I think I can’t tell what I want. I reask question a little bit different :)

I have wav data , and I want to play it.These process repeat for many times. For these reason I can’t use FSOUND_Sample_Load , ( I think ) I should use FSOUND_Sample_Upload . But I heard biiiiip sound. General structure of my code like below. Is there any mistake, misorder or something wrongs. Thanks…

FSOUND_SAMPLE *samp;  

    samp = FSOUND_Sample_Alloc(FSOUND_UNMANAGED, RECORDLEN, FSOUND_STEREO | FSOUND_16BITS | FSOUND_LOADMEMORY, RECORDRATE, 255, 128, 255);

     FSOUND_Sample_SetMode(samp,FSOUND_LOOP_NORMAL);

     FSOUND_Sample_SetLoopPoints( samp ,0 , END_OFF_SAMPLE );

     FSOUND_Sample_Lock( samp , 
                            0 ,
                            BOYUT ,
                            &ptr1,
                            &ptr2,
                            &len1,
                            &len2)                               

      FSOUND_Sample_Upload ( samp , 
                     data,
  FSOUND_STEREO | FSOUND_16BITS | FSOUND_LOADMEMORY );

  FSOUND_PlaySound(FSOUND_FREE , samp);

      FSOUND_Sample_Unlock( samp , 
                                &ptr1,
                                &ptr2,
                                len1,
                                len2);
  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.