Panda3D
vorbisAudio.h
1 // Filename: vorbisAudio.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 VORBISAUDIO_H
16 #define VORBISAUDIO_H
17 
18 #include "pandabase.h"
19 #include "movieAudio.h"
20 
21 #ifdef HAVE_VORBIS
22 
23 class VorbisAudioCursor;
24 
25 ////////////////////////////////////////////////////////////////////
26 // Class : VorbisAudio
27 // Description : Interfaces with the libvorbisfile library to
28 // implement decoding of Ogg Vorbis audio files.
29 ////////////////////////////////////////////////////////////////////
30 class EXPCL_PANDA_MOVIES VorbisAudio : public MovieAudio {
31 PUBLISHED:
32  VorbisAudio(const Filename &name);
33  virtual ~VorbisAudio();
34  virtual PT(MovieAudioCursor) open();
35 
36  static PT(MovieAudio) make(const Filename &name);
37 
38 private:
39  friend class VorbisAudioCursor;
40 
41 public:
42  static TypeHandle get_class_type() {
43  return _type_handle;
44  }
45  static void init_type() {
46  TypedWritableReferenceCount::init_type();
47  register_type(_type_handle, "VorbisAudio",
48  MovieAudio::get_class_type());
49  }
50  virtual TypeHandle get_type() const {
51  return get_class_type();
52  }
53  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
54 
55 private:
56  static TypeHandle _type_handle;
57 };
58 
59 #include "vorbisAudio.I"
60 
61 #endif // HAVE_VORBIS
62 
63 #endif // VORBISAUDIO_H
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.
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