I am trying to use MAD library (libmad) which is a decoding library for mp3 in visual c++. The library is in visual c++ project and it opens and compiles as "libmad.lib". Then i tried to use this library as a simple decoding console program just like "minimad.c", which is in POSIX form" to my own Visual C++ console program.
Then I get error for conversion. The error no. is error C2440. I goggled this error number and i came to conclusion that void data type cannot be converted to any other type in Visual C++ as it is possible in GNU Compiler in Linux.
So any one can please tell me a way to convert void* to stuct*. I used type casting in some way, it solved the error of conversion of char* but i am not able to convert void* to struct*. The void* is mostly used in the libmad library. So it is unavoidable. Please Help me..
Here are the links:
libmad or MAD = http://www.underbit.com/products/mad/
static enum mad_flow input(void *data, struct mad_stream *stream)
struct buffer *buffer = data; //Compiler points error:2440 here
mad_stream_buffer(stream, buffer->start, buffer->length);
buffer->length = 0;