Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5815 in orxonox.OLD for branches


Ignore:
Timestamp:
Nov 29, 2005, 1:19:24 AM (19 years ago)
Author:
bensch
Message:

orxonox/branches/world_entities: sound-engine loads devices over a System-specific string

Location:
branches/world_entities/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/world_entities/src/lib/sound/sound_engine.cc

    r5779 r5815  
    2121#include "sound_engine.h"
    2222
    23 //#include <AL/alc.h> // maybe later
    2423#include "class_list.h"
    2524
     
    208207void SoundEngine::flushUnusedBuffers()
    209208{
     209  /// FIXME
    210210/*  if(this->sourceList && this->bufferList)
    211211  {
     
    280280  }
    281281
    282 
    283   alutInit(NULL, 0);
     282  // INITIALIZING THE DEVICE:
     283  ALCubyte deviceName[] =
     284#ifdef __WIN32__
     285      "native";
     286#else
     287      "'( ( devices '( native arts null ) ) )";
     288#endif
     289  //
     290  this->device = alcOpenDevice(deviceName);
     291
     292  this->context = alcCreateContext(this->device, NULL);
     293
     294  alcMakeContextCurrent(this->context);
     295
     296
    284297  if ((result = alGetError()) != AL_NO_ERROR)
    285298    SoundEngine::PrintALErrorString(result);
  • branches/world_entities/src/lib/sound/sound_engine.h

    r5779 r5815  
    6868    static SoundEngine*      singletonRef;             //!< Reference to this class
    6969
     70    ALCdevice*               device;                   //!< the used audio-device.
     71    ALCcontext*              context;                  //!< the context, currently in use.
     72
    7073    float                    musicVolume;              //!< the maximum volume of the music in % (0f,1f]
    7174    float                    effectsVolume;            //!< the maximum volume of sound-effects in % (0f,1f]
    7275    PNode*                   listener;                 //!< The listener of the Scene
     76
    7377    std::list<BaseObject*>*  bufferList;               //!< A list of buffers
    7478    std::list<BaseObject*>*  sourceList;               //!< A list for all the sources in the scene.
     79
    7580
    7681};
  • branches/world_entities/src/world_entities/weapons/aiming_turret.cc

    r5769 r5815  
    4949
    5050  this->setActionSound(WA_SHOOT, "sound/shot1.wav");
    51   this->setActionSound(WA_ACTIVATE, "sound/vocals/missiles.wav");
     51  this->setActionSound(WA_ACTIVATE, "sound/voices/rockets.wav");
    5252  this->setActionSound(WA_RELOAD, "sound/vocals/reload.wav");
    5353}
Note: See TracChangeset for help on using the changeset viewer.