Panda3D
 All Classes Functions Variables Enumerations
wavAudio.h
1 // Filename: wavAudio.h
2 // Created by: rdb (23Aug13)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef WAVAUDIO_H
16 #define WAVAUDIO_H
17 
18 #include "pandabase.h"
19 #include "movieAudio.h"
20 
21 class WavAudioCursor;
22 
23 ////////////////////////////////////////////////////////////////////
24 // Class : WavAudio
25 // Description : A native PCM .wav loader. Supported formats
26 // are linear PCM, IEEE float, A-law and mu-law.
27 ////////////////////////////////////////////////////////////////////
28 class EXPCL_PANDA_MOVIES WavAudio : public MovieAudio {
29 PUBLISHED:
30  WavAudio(const Filename &name);
31  virtual ~WavAudio();
32  virtual PT(MovieAudioCursor) open();
33 
34  static PT(MovieAudio) make(const Filename &name);
35 
36 private:
37  friend class WavAudioCursor;
38 
39 public:
40  static TypeHandle get_class_type() {
41  return _type_handle;
42  }
43  static void init_type() {
44  TypedWritableReferenceCount::init_type();
45  register_type(_type_handle, "WavAudio",
46  MovieAudio::get_class_type());
47  }
48  virtual TypeHandle get_type() const {
49  return get_class_type();
50  }
51  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
52 
53 private:
54  static TypeHandle _type_handle;
55 };
56 
57 #include "wavAudio.I"
58 
59 #endif
Used for reading PCM .wav files.
The name of a file, such as a texture file or an Egg file.
Definition: filename.h:44
A MovieAudio is actually any source that provides a sequence of audio samples.
A native PCM .wav loader.
Definition: wavAudio.h:28
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
A MovieAudio is actually any source that provides a sequence of audio samples.
Definition: movieAudio.h:48