Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support


Post Reply 
Sounds crashing the game
Author Message
Jack1 Offline
Junior Member

Posts: 24
Joined: Dec 2011
Reputation: 0
Post: #1
Sounds crashing the game

So, i've successfully compiled and ran the Penumbra Overture inside Visual Studio 2010 after removing the menu music starter in source code. And the major problem is (obviously) related to sounds and music. Everytime a sound should be loaded and played, the game crashes and VS asks me if i want to break or continue with the execution. If i dint remove these lines in MainMenu.cpp, the game wouldnt even load:
mpInit->mpGame->GetSound()->GetMusicHandler()->Play("music_theme.ogg",1,5.0f,false);

            if(pSoundHandler->IsPlaying("gui_rain1")==false)
                pSoundHandler->PlayGui("gui_rain1",true,1);

and when i did remove these lines and i press some button in the main menu, for example the Options button, it should play the button click sound (some kind of thump) the game crashes and the error seems to be in ope.c file. And that file a default windows file and handles some windows file opening functions. I think the error is with the OALWrapper or with other sound system because when i dint remove those lines mentoined above, the game crashes at the Loading... screen and VS says that the error is in MainMenu.cpp at line 2517 (wich is: mpInit->mpGame->GetSound()->GetMusicHandler()->Play("music_theme.ogg",1,5.0f,false); )
Any advice will be appreciated.
(This post was last modified: 05-07-2012 12:54 PM by Jack1.)
04-30-2012 09:38 PM
Find all posts by this user Quote this message in a reply
Urkle Offline
FG - Associate

Posts: 1,172
Joined: Jul 2006
Reputation: 20
Post: #2
RE: Sounds crashing the game

I would start debugging and figure out exactly what value is being sent to the file opening methods..

In the latest trunk there was some slight changes to the way the file handling routines are registered w/ OALWrapper that *may* be a possible cause to your grief. You may need to update the version of libvorbisfile (and libogg while you are at it) in the dependencies zip.

Developing away on one of
Multiple Macs running 10.6, 10.7, 10.8, and 10.9.
Linux, 8-core AMD, 8GB RAM, Fedora 18, nVidia 450 1GB
04-30-2012 10:07 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Jack1 Offline
Junior Member

Posts: 24
Joined: Dec 2011
Reputation: 0
Post: #3
RE: Sounds crashing the game

OK, i think the problem is with loading the actual files. The error seems to be in OAL_Loaders.cpp at line 77
return gpDevice->LoadStream(asFilename);

full function:
cOAL_Stream* OAL_Stream_Load(const string &asFilename)
{
    if (gpDevice == NULL) return NULL;

       return gpDevice->LoadStream(asFilename);
}

Seems to have problems here too:
    /////////////////////////////////
    //Create from file
    if(pStream->CreateFromFile(asFilename))
    {
        mlstStreams.push_back(pStream);
        //hpl::Log("Loaded stream %s\n", pStream->msName.c_str());
    }
    else
    {
        delete pStream;
        pStream = NULL;
    }

    return pStream;

}
(This post was last modified: 05-05-2012 09:13 PM by Jack1.)
05-01-2012 08:34 AM
Find all posts by this user Quote this message in a reply
Jack1 Offline
Junior Member

Posts: 24
Joined: Dec 2011
Reputation: 0
Post: #4
RE: Sounds crashing the game

Everything works now as i took an older OALWrapper source from github Big Grin
(This post was last modified: 05-07-2012 12:55 PM by Jack1.)
05-06-2012 04:12 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)