Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

IGSoundEffectsSubsystem.SoundRef


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
class SoundRef extends Core.Object
	abstract
    native;

// ============================================================================
// SoundRef
//  
// A soundref object is a simple wrapper for the low level engine specifics
// of playing a sound or a stream.  This is the abstract base class.  There is 
// also a StreamSoundRef and a NormalSoundRef, which are wrappers for streaming 
// sounds and normal unreal usound objects respectively.  This class is used 
// across multiple classes and specifically helps decouple SoundSets, SoundSpecifications,
// and SoundInstances.
//
// This abstract base class is mainly for the shared C++ code between the subclasses
// as can be seen in cpptext.
// ============================================================================

// Simple equality, base classes can override 
simulated function bool Equals (SoundRef inOtherRef)
{
	return (self == inOtherRef);
}

simulated event string toString();

cpptext
{
    // These can't be abstract virtual functions because unreal instantiates a uobject in 
    // a declare class macro.  I could make this class noexport and use DECLARE_ABSTRACT_CLASS
    // but that's a major pain in the ass.
    // TODO: Make these functions either static or truely immutable...
    virtual INT Play(ASoundInstance* inInstance)   { check(false); return 0; }
    virtual void Stop(ASoundInstance* inInstance)   { check(false); }
    virtual void Mute(ASoundInstance* inInstance)   { check(false); }
    virtual void UnMute(ASoundInstance* inInstance) { check(false); }

    virtual void SetPitch(ASoundInstance* inInstance, FLOAT inPitch) { check(false); }
    virtual void SetVolume(ASoundInstance* inInstance, FLOAT inVolume) { check(false); }
    
    virtual FLOAT GetDuration(ASoundInstance* inInstance) { check(false); return 0.0f; }

    // TODO: make the uscrip Equals call the c++ Equals...
    virtual UBOOL Equals(class USoundRef* inOther)
    {
        return this == inOther;
    }
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: ne 5.9.2004 16:02:12.000 - Creation time: st 23.5.2018 00:10:47.188 - Created with UnCodeX