Click here to Skip to main content
13,045,019 members (39,984 online)
Rate this:
Please Sign up or sign in to vote.
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 28-Jun-13 23:18pm
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 29 Jun 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100