I need to obtain information directly from the Mix_Music structure
but the compuiler (Visual C++ 6.0 for Win32) shows me the following
message:
error C2027: use of undefined type '_Mix_Music’
see declaration of '_Mix_Music’
error C2227: left of ‘->type’ must point to class/struct/union
error C2027: use of undefined type ‘_Mix_Music’
my code:
#include “SDL_mixer.h”
Mix_Music *music;
…
int msStep = music->fade_step;
…
…And also I must access to the OGG file int this struct.
Thanks.----------------------------------------------------------------------
Tu correo gratis en MixMail
Ya.com ADSL: Router 3Com+ tarjeta de red + 1 mes A!GRATIS!
Looking in SDL_mixer.h, neither _Mix_Music nor Mix_Music is defined. (although plenty of pointers to them are passed around).
Odd, I didn’t know that was vaild syntax.
struct Mix_Music is defined in music.c as this:
struct _Mix_Music {
Mix_MusicType type;
union {
#ifdef CMD_MUSIC
MusicCMD *cmd;
#endif
#ifdef WAV_MUSIC
WAVStream *wave;
#endif
#ifdef MOD_MUSIC
UNIMOD *module;
#endif
#ifdef MID_MUSIC
#ifdef USE_TIMIDITY_MIDI
MidiSong *midi;
#endif
#ifdef USE_NATIVE_MIDI
NativeMidiSong *nativemidi;
#endif
#endif
#ifdef OGG_MUSIC
OGG_music *ogg;
#endif
#ifdef MP3_MUSIC
SMPEG *mp3;
#endif
} data;
Mix_Fading fading;
int fade_step;
int fade_steps;
int error;
};----- Original Message -----
From: Elvis Enmanuel Castillo Nu?ez
To: sdl at libsdl.org
Sent: Thursday, December 19, 2002 11:13 AM
Subject: [SDL] Acess to the Mix_Music structure
I need to obtain information directly from the Mix_Music structure
but the compuiler (Visual C++ 6.0 for Win32) shows me the following message:
error C2027: use of undefined type '_Mix_Music’
see declaration of '_Mix_Music’
error C2227: left of ‘->type’ must point to class/struct/union
error C2027: use of undefined type ‘_Mix_Music’
my code:
#include “SDL_mixer.h”
Mix_Music *music;
…
int msStep = music->fade_step;
…
…And also I must access to the OGG file int this struct.
Thanks.
Tu correo gratis en MixMail
Ya.com ADSL: Router 3Com+ tarjeta de red + 1 mes ?GRATIS!
_______________________________________________ SDL mailing list SDL at libsdl.org http://www.libsdl.org/mailman/listinfo/sdl
I wanted to do the same thing about this time last year, here’s the
thread from my post:
http://www.libsdl.org/pipermail/sdl/2002-January/041171.html
Short answer, you can’t access anything in Mix_Music. The author’s of SDL
are doing a little data hiding in order to have a clean interface.
Ya, I really don’t like it, but I guess it’s the “Right Thing” to do.
I’m not sure, but maybe SDL_sound will let you access format specific
data.
nathanOn Thu, 19 Dec 2002 Elvis Enmanuel Castillo Nunez" @vr.clemson.edu wrote:
I need to obtain information directly from the Mix_Music structure
but the compuiler (Visual C++ 6.0 for Win32) shows me the following
message:
error C2027: use of undefined type ‘_Mix_Music’
see declaration of ‘_Mix_Music’
error C2227: left of ‘->type’ must point to class/struct/union
error C2027: use of undefined type ‘_Mix_Music’
my code:
#include “SDL_mixer.h”
Mix_Music *music;
…
int msStep = music->fade_step;
…
…And also I must access to the OGG file int this struct.
Thanks.
Tu correo gratis en MixMail
Ya.com ADSL: Router 3Com+ tarjeta de red + 1 mes ?GRATIS!
_______________________________________________ SDL mailing list
SDL at libsdl.org http://www.libsdl.org/mailman/listinfo/sdl