0
0

Hi, I just have one (maybe simple) question for understanding:

I just coded a mini-sinewave-generator by using the functions FSOUND_Sample_Alloc and FSOUND_Sample_Lock.
All works fine, even the looping is not hearable.

But why have I to use the FSOUND_Sample_Unlock – function? It makes no difference if I use it or not. What is it?
Is it like opening and closing a file ?
-> ‘opening’ and ‘closing’ a part of memory?

  • You must to post comments
0
0

If you don’t unlock it, the memory won’t get freed correctly when the sample is deallocated. Windows isn’t allowed to touch locked memory. Because that’s all FSOUND_Sample_Lock does–it “bolts down” the buffer so Windows doesn’t move it around while you’re working on it.

  • You must to post comments
0
0

Thank you !

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.