I did. I just didn’t understand how I pass the pointer into the parameter I normally pass the filename into using FSOUND_Sample_Load with FSOUND_LOADMEMORY. I have an LPVOID pointer called data. How do I pass this variable into a const char * parameter?
You cast it into a char*:
sample = FSOUND_Sample_Load(FSOUND_FREE, (char)data, FSOUND_LOOP_OFF | FSOUND_2D | FSOUND_LOADMEMORY, number_of_bytes_pointed_to_by_data);
An LPVOID is nothing more than a “long pointer to void” -> void*, and a pointer type can be casted into any other pointer type.
Please login first to submit.