Tiberian Technologies Scripts Reference Revision: 9000
Loading...
Searching...
No Matches
SoundBufferClass.h
1/* Renegade Scripts.dll
2 Copyright 2013 Tiberian Technologies
3
4 This file is part of the Renegade scripts.dll
5 The Renegade scripts.dll is free software; you can redistribute it and/or modify it under
6 the terms of the GNU General Public License as published by the Free
7 Software Foundation; either version 2, or (at your option) any later
8 version. See the file COPYING for more details.
9 In addition, an exemption is given to allow Run Time Dynamic Linking of this code with any closed source module that does not contain code covered by this licence.
10 Only the source code to the module(s) containing the licenced code has to be released.
11*/
12#ifndef TT_INCLUDE_SOUNDBUFFERCLASS_H
13#define TT_INCLUDE_SOUNDBUFFERCLASS_H
14#include "engine_vector.h"
15class FileClass;
16class SoundBufferClass : public RefCountClass {
17public:
18 char* cBuffer; // 32
19 uint32 uLength; // 36
20 char* cFile; // 40
21 uint32 uDuration; // 44
22 uint32 uRate; // 48
23 uint32 uBits; // 52
24 uint32 uChannels; // 56
25 uint32 uType; // 60
26 unsigned int flag;
27 int cachecount;
28 SoundBufferClass();
29 virtual ~SoundBufferClass();
30 virtual bool Load_From_File (const char* cFile);
31 virtual bool Load_From_File (FileClass& xFile);
32 virtual bool Load_From_Memory (const char* cBuffer, uint32 uLength);
33 virtual const char* Get_Raw_Buffer () const;
34 virtual uint32 Get_Raw_Length () const;
35 virtual const char* Get_Filename () const;
36 virtual void Set_Filename (const char* cFile);
37 virtual uint32 Get_Duration () const;
38 virtual uint32 Get_Rate () const;
39 virtual uint32 Get_Bits () const;
40 virtual uint32 Get_Channels () const;
41 virtual uint32 Get_Type () const;
42 virtual bool Is_Streaming () const;
43 virtual void Free_Buffer ();
44 virtual void Determine_Stats (char *stats);
45};
46
47class StreamSoundBufferClass : public SoundBufferClass {
48public:
49 StreamSoundBufferClass();
50 virtual ~StreamSoundBufferClass();
51 virtual bool Load_From_File (const char* cFile);
52 virtual bool Load_From_File (FileClass& xFile);
53 virtual bool Load_From_Memory (const char* cBuffer, uint32 uLength);
54 virtual bool Is_Streaming () const;
55 virtual void Free_Buffer ();
56 virtual bool Load_From_File(void *handle, uint32 u1, uint32 u2);
57};
58
59#endif