Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 711


Ignore:
Timestamp:
Dec 28, 2007, 11:06:47 PM (16 years ago)
Author:
rgrieder
Message:
  • removed attempt to fix audio on windows
File:
1 edited

Legend:

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

    r708 r711  
    2828
    2929#include "AudioStream.h"
    30 #include "orxonox/core/Debug.h"
     30#include "../orxonox/core/Debug.h"
    3131
    3232namespace audio
    3333{
    34         AudioStream::AudioStream(orxonox::String path)
     34        AudioStream::AudioStream(String path)
    3535        {
    3636                this->path = path;
     
    4040        void AudioStream::open()
    4141        {
    42             //int result;
    43       errno_t result;
    44 
    45 
    46             if(fopen_s(&oggFile, path.c_str(), "rb"))
     42            int result;
     43
     44
     45            if(!(oggFile = fopen(path.c_str(), "rb")))
    4746                        {
    4847                orxonox::Error("Could not open Ogg file "+path);
    4948                                return;
    5049                        }
    51       else
    52       {
    53         COUT(4) << "Opened Ogg file" << path << std::endl;
    54       }
    55 
    56             /*if((result = ov_open(oggFile, &oggStream, NULL, 0)) < 0)
     50
     51            if((result = ov_open(oggFile, &oggStream, NULL, 0)) < 0)
    5752            {
    5853        fclose(oggFile);
    5954              orxonox::Error("Could not open Ogg stream. " + errorString(result));
    6055                                return;
    61             }*/
     56            }
    6257
    6358                        loaded = true;
     
    259254
    260255
    261         orxonox::String AudioStream::errorString(int code)
     256        String AudioStream::errorString(int code)
    262257        {
    263258            switch(code)
    264259            {
    265260                case OV_EREAD:
    266                     return orxonox::String("Read from media.");
     261                    return String("Read from media.");
    267262                case OV_ENOTVORBIS:
    268                     return orxonox::String("Not Vorbis data.");
     263                    return String("Not Vorbis data.");
    269264                case OV_EVERSION:
    270                     return orxonox::String("Vorbis version mismatch.");
     265                    return String("Vorbis version mismatch.");
    271266                case OV_EBADHEADER:
    272                     return orxonox::String("Invalid Vorbis header.");
     267                    return String("Invalid Vorbis header.");
    273268                case OV_EFAULT:
    274                     return orxonox::String("Internal logic fault (bug or heap/stack corruption.");
     269                    return String("Internal logic fault (bug or heap/stack corruption.");
    275270                default:
    276                     return orxonox::String("Unknown Ogg error.");
     271                    return String("Unknown Ogg error.");
    277272            }
    278273        }
Note: See TracChangeset for help on using the changeset viewer.