Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7304 in orxonox.OLD for trunk/src/lib/sound/ogg_player.h


Ignore:
Timestamp:
Apr 16, 2006, 8:27:32 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: moved the AudioThread completely to the OggPlayer. This cleans out the unnecesary overFULLNESS from game_world

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/sound/ogg_player.h

    r7303 r7304  
    1515#include <ogg/ogg.h>
    1616#include <vorbis/vorbisfile.h>
     17#include <SDL_thread.h>
    1718
    1819struct File;
     
    3132  bool open(const std::string& fileName);
    3233  void release();
    33   void debug();
    34   bool playback();
     34  bool play();
    3535  bool playing();
    3636  bool update();
     
    3838  void jumpTo(float timeCode);
    3939
     40  void debug();
    4041  void printState();
     42
     43  static int createAudioThread(void* oggPlayer);
     44
    4145
    4246protected:
     
    4549  const char* errorString(int code);
    4650
    47   public:
    48     typedef enum {
    49       None                   = 0x000,
    50       FileOpened             = 0x100,
    51       SourceAllocated        = 0x200,
    52       BuffersAllocated       = 0x400,
    53       Stopped                = 0x010,
    54       Playing                = 0x020,
    55       Paused                 = 0x040,
    56       Error                  = 0x001,
    57     } State;
     51private:
     52  bool playback();
     53
     54
     55public:
     56  typedef enum {
     57    None                   = 0x000,
     58    FileOpened             = 0x100,
     59    SourceAllocated        = 0x200,
     60    BuffersAllocated       = 0x400,
     61    Stopped                = 0x010,
     62    Playing                = 0x020,
     63    Paused                 = 0x040,
     64    Error                  = 0x001,
     65  } State;
    5866
    5967private:
     
    6775  ALenum              format;               //!< The format we play back
    6876  unsigned int        state;
    69   //bool                trackLoaded;          //!< If a Track has been loaded.
     77
     78  SDL_Thread*         musicThread;          //!< The Thread in which music is Played back.
    7079};
    7180
Note: See TracChangeset for help on using the changeset viewer.