0
0

How do you load a sample from memory if you have a pointer to the data?

Thanks.

  • You must to post comments
0
0

Look up FSOUND_Sample_Load and FSOUND_LOADMEMORY.

RTFM.

  • You must to post comments
0
0

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 must to post comments
0
0

You cast it into a char*:

FSOUND_SAMPLE sample;
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.

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.