Original Post
For some reason, my thread keeps terminating without warning. I have absolutely no idea what the problem is. All I know is that the thread terminates whenever I attempt to use/access a string (be it std::string or char*). The thread was created with _beginthreadex. Furthermore, I was writing an ogg vorbis player for bgm using a thread for audio processing; and the code was posted by another user in this thread:
http://www.gamedev.net/topic/221938-here-is-a-class-for-streaming-ogg-vorbis-in-directsound-bsd-license/
I don't know what could cause the thread to terminate. But it terminates right here for me:
[code]bool CDirectSoundOgg::Allocate() {
//----- open OGG file
//get a handle to the file
FILE *fileHandle = fopen(GetFileName().c_str(), "rb");
...
I even wrote some code to print out the filename using OutputDebugString, but it dies there too. When the string is accessed, the debug output tells me that the thread has terminated (code 0x0). Been at this for a while, and can't find any solutions. This sucks. Any ideas? Thanks.
Btw, if you need my code that I wrote personally, I can post that too.
http://www.gamedev.net/topic/221938-here-is-a-class-for-streaming-ogg-vorbis-in-directsound-bsd-license/
I don't know what could cause the thread to terminate. But it terminates right here for me:
[code]bool CDirectSoundOgg::Allocate() {
//----- open OGG file
//get a handle to the file
FILE *fileHandle = fopen(GetFileName().c_str(), "rb");
...
I even wrote some code to print out the filename using OutputDebugString, but it dies there too. When the string is accessed, the debug output tells me that the thread has terminated (code 0x0). Been at this for a while, and can't find any solutions. This sucks. Any ideas? Thanks.
Btw, if you need my code that I wrote personally, I can post that too.