Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 28, 2007, 10:30:29 PM (16 years ago)
Author:
rgrieder
Message:
  • added Vector2, Vector3, Matrix3, ColourValue, Quaternion and String to the misc folder as header files (each of them contains #include <string> … typedef std::string String , etc.)
  • please use String from now on by including <misc/String.h"
  • removed #include <OgreVector3.h", etc. from "CoreIncludes.h" (adjusted all source files)
  • adjusted all the source files (except network, that keeps <string> for the moment) (what a mess..)
  • moved usleep hack to misc/Sleep.h
  • relative include paths for files from other root directories (like misc, network, etc.) (but it stills writes "../Orxonox.h" when in folder orxonox/objects)
  • "OgreSceneManager.h" —> <OgreSceneManager.h>
  • included OrxonoxPrereqs in every file in folder orxonox
  • moved HUD and ParticleInterface to namespace orxonox
  • removed some using namespace Ogre/std when appropriate
  • I hope I haven't forgotten important points..
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/audio/AudioStream.cc

    r677 r708  
    2828
    2929#include "AudioStream.h"
    30 #include "../orxonox/core/Debug.h"
     30#include "orxonox/core/Debug.h"
    3131
    3232namespace audio
    3333{
    34         AudioStream::AudioStream(std::string path)
     34        AudioStream::AudioStream(orxonox::String path)
    3535        {
    3636                this->path = path;
     
    4040        void AudioStream::open()
    4141        {
    42             int result;
    43 
    44 
    45             if(!(oggFile = fopen(path.c_str(), "rb")))
     42            //int result;
     43      errno_t result;
     44
     45
     46            if(fopen_s(&oggFile, path.c_str(), "rb"))
    4647                        {
    4748                orxonox::Error("Could not open Ogg file "+path);
    4849                                return;
    4950                        }
    50 
    51             if((result = ov_open(oggFile, &oggStream, NULL, 0)) < 0)
     51      else
     52      {
     53        COUT(4) << "Opened Ogg file" << path << std::endl;
     54      }
     55
     56            /*if((result = ov_open(oggFile, &oggStream, NULL, 0)) < 0)
    5257            {
    5358        fclose(oggFile);
    5459              orxonox::Error("Could not open Ogg stream. " + errorString(result));
    5560                                return;
    56             }
     61            }*/
    5762
    5863                        loaded = true;
     
    254259
    255260
    256         std::string AudioStream::errorString(int code)
     261        orxonox::String AudioStream::errorString(int code)
    257262        {
    258263            switch(code)
    259264            {
    260265                case OV_EREAD:
    261                     return std::string("Read from media.");
     266                    return orxonox::String("Read from media.");
    262267                case OV_ENOTVORBIS:
    263                     return std::string("Not Vorbis data.");
     268                    return orxonox::String("Not Vorbis data.");
    264269                case OV_EVERSION:
    265                     return std::string("Vorbis version mismatch.");
     270                    return orxonox::String("Vorbis version mismatch.");
    266271                case OV_EBADHEADER:
    267                     return std::string("Invalid Vorbis header.");
     272                    return orxonox::String("Invalid Vorbis header.");
    268273                case OV_EFAULT:
    269                     return std::string("Internal logic fault (bug or heap/stack corruption.");
     274                    return orxonox::String("Internal logic fault (bug or heap/stack corruption.");
    270275                default:
    271                     return std::string("Unknown Ogg error.");
     276                    return orxonox::String("Unknown Ogg error.");
    272277            }
    273278        }
Note: See TracChangeset for help on using the changeset viewer.