libvorbisfile callbacks

Started by
3 comments, last by Ademan555 19 years, 3 months ago
Ive written a set of callbacks for using std::fstream for file loading, heres what i created: http://www.rafb.net/paste/results/KyN7uT60.html when i call ov_open_callbacks() it returns OV_EFAULT, i traced through and found it quits after my read function is called aboutthe 3rd time... i know the file is valid (tested with winamp) and i know the fstream is open (i have assert(MyFile.is_open()) before my ov_open_callbacks() gets called) anyone who knows whats wrong with my callbacks, let me know thanks a ton -Dan
When General Patton died after World War 2 he went to the gates of Heaven to talk to St. Peter. The first thing he asked is if there were any Marines in heaven. St. Peter told him no, Marines are too rowdy for heaven. He then asked why Patton wanted to know. Patton told him he was sick of the Marines overshadowing the Army because they did more with less and were all hard-core sons of bitches. St. Peter reassured him there were no Marines so Patton went into Heaven. As he was checking out his new home he rounded a corner and saw someone in Marine Dress Blues. He ran back to St. Peter and yelled "You lied to me! There are Marines in heaven!" St. Peter said "Who him? That's just God. He wishes he were a Marine."
Advertisement
Before every reinterpret cast you use, check to see if that pointer is !NULL. At least that way you can slowly eliminate the potential the pointer being passed is no longer valid.
thanks, i actually have breakpoints throught that and ive checked for null (plus i think id end up with an access violation rather than a returned error)
(sorry for the über necro, i was gone all week)
anyone else have any ideas?
thanks
-Dan
When General Patton died after World War 2 he went to the gates of Heaven to talk to St. Peter. The first thing he asked is if there were any Marines in heaven. St. Peter told him no, Marines are too rowdy for heaven. He then asked why Patton wanted to know. Patton told him he was sick of the Marines overshadowing the Army because they did more with less and were all hard-core sons of bitches. St. Peter reassured him there were no Marines so Patton went into Heaven. As he was checking out his new home he rounded a corner and saw someone in Marine Dress Blues. He ran back to St. Peter and yelled "You lied to me! There are Marines in heaven!" St. Peter said "Who him? That's just God. He wishes he were a Marine."
Casting the FromWhere is the only thing that looks suspect to me. I couldn't find anything that stated they are interchangable, and I even found something that shows them as being different: Link.

edit: I mean different across C compilers.
vc 7.1

xiosbase
	static const _Seekdir beg = (_Seekdir)0;	static const _Seekdir cur = (_Seekdir)1;	static const _Seekdir end = (_Seekdir)2;


stdio.h
#define SEEK_CUR    1#define SEEK_END    2#define SEEK_SET    0


i dont think thats the problem , thanks again

-Dan
When General Patton died after World War 2 he went to the gates of Heaven to talk to St. Peter. The first thing he asked is if there were any Marines in heaven. St. Peter told him no, Marines are too rowdy for heaven. He then asked why Patton wanted to know. Patton told him he was sick of the Marines overshadowing the Army because they did more with less and were all hard-core sons of bitches. St. Peter reassured him there were no Marines so Patton went into Heaven. As he was checking out his new home he rounded a corner and saw someone in Marine Dress Blues. He ran back to St. Peter and yelled "You lied to me! There are Marines in heaven!" St. Peter said "Who him? That's just God. He wishes he were a Marine."

This topic is closed to new replies.

Advertisement