Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I use Sound::readData of Fmod.dll to get the data out of the mp3 file;

void *pointer1 = new byte[ 4096 ];
unsigned int length;

system -> createSound( filePath, FMOD_OPENONLY | FMOD_ACCURATETIME, NULL, &sound );
sound-> readData( pointer1, 4096, &length );

But all of 4096 byte is 0, does anyone knows what's wrong?
Posted
Comments
zlogdan 1-Jul-13 13:39pm    
Have you tried to allocate more than 4K bytes for the buffer ? Are you supposed to receive the number of bytes read at length or you are supposed to inform its size, in either cases please initiate the variable before trying to call the readData method. Also, does this method return anything or it is a void return method ? Perhaps the return value will indicate you what is wrong.
The_Inventor 2-Jul-13 1:01am    
I concur sir.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900