Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ MFC
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 29-Jun-13 0:18am
Comments
zlogdan at 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 at 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
0 OriginalGriff 325
1 DamithSL 265
2 CPallini 235
3 Sergey Alexandrovich Kryukov 229
4 Maciej Los 190
0 OriginalGriff 5,455
1 DamithSL 4,422
2 Maciej Los 3,860
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,010


Advertise | Privacy | Mobile
Web02 | 2.8.141216.1 | Last Updated 29 Jun 2013
Copyright © CodeProject, 1999-2014
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