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?
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.
Please login first to submit.