Skip to main content
gamedev.net
🔒 Locked

libvorbisfile callbacks

Started by Ademan555 Dec 17, 2004 at 1:54 AM 3 replies 900+ views
Original Post
Ademan555
Ademan555
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 hi
Drew_Benton
Drew_Benton
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.
Ademan555
Ademan555
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 hi
Kibble
Kibble
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.
Ademan555
Ademan555
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 hi

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.