00001 /* 00002 Copyright (C) 1999 Malte Weiß, Carsten Winkelholz 00003 00004 Malte Weiß, 05.08.2002: All fields beside event-outs are dynamically loaded. 00005 07.08.2002: Fields loop and pitch supported. 00006 08.08.2002: Node fully supported (event handling + OpenAL support). 00007 00008 Address: FGAN Forschungsgesellschaft fr Angewandte Naturwissenschaften e. V. 00009 Neuenahrer Str. 20 00010 D - 53343 Wachtberg 00011 00012 Email: winkelholz@fgan.de 00013 00014 This program is free software; you can redistribute it and/or 00015 modify it under the terms of the GNU General Public License 00016 as published by the Free Software Foundation; either version 2 00017 of the License, or (at your option) any later version. 00018 00019 This program is distributed in the hope that it will be useful, 00020 but WITHOUT ANY WARRANTY; without even the implied warranty of 00021 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00022 GNU General Public License for more details. 00023 00024 You should have received a copy of the GNU General Public License 00025 along with this program; if not, write to the Free Software 00026 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00027 */ 00028 00029 00030 #ifndef CYBAUDIOCLIPC_H 00031 #define CYBAUDIOCLIPC_H 00032 00033 #include "oaw/ctk/cybnodec.h" 00034 #include "oaw/ctk/cybwrlfields.h" 00035 #include "../oawconfig.h" 00036 00037 OAW_BEGIN_NAMESPACE 00038 00039 struct _Source; 00040 typedef _Source* SOURCE; 00041 00042 00043 00044 class OAW_DLLMAPPING CybAudioClipC : public CybNodeC 00045 { 00046 public: 00047 CybAudioClipC(CybWorldC*); 00048 CybAudioClipC(const CybAudioClipC&); 00049 CybAudioClipC& operator = (const CybAudioClipC&); 00050 virtual ~CybAudioClipC(); 00051 00052 virtual void FinishInit(); 00053 virtual void SetEvent(long, const void*, BaseI*); 00054 virtual long GetFieldEventID(const char*); 00055 virtual long GetFieldDataType(long); 00056 virtual short GetFieldData(long,void* data); 00057 00058 // Event outs 00059 void SendEventOut_isActive(SFBool b); 00060 void SendEventOut_durationChanged(SFTime t); 00061 00062 protected: 00063 virtual void CreateNewCopy(CybNodeC*); 00064 virtual void LoadVRML(char*& iter, const char* iterEnd,long& znr); 00065 00066 protected: 00067 SFBool m_bLoading; // Currently loading? 00068 00069 public: 00070 // Audio clip properties 00071 SFString m_strDescription; 00072 SFBool m_bLoop; 00073 SFFloat m_fPitch; 00074 SFTime m_tStartTime; 00075 SFTime m_tStopTime; 00076 MFString m_msUrl; 00077 00078 SFBool m_isActive; 00079 SFTime m_duration; 00080 00081 // Sound object 00082 SOURCE m_pSource; 00083 00084 // Key list 00085 static char VRMLKeyStrList[][30]; 00086 }; 00087 00088 OAW_END_NAMESPACE 00089 00090 #endif 00091 00092
1.3-rc2