Panda3D
flacAudio.h
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file flacAudio.h
10  * @author rdb
11  * @date 2016-04-27
12  */
13 
14 #ifndef FLACAUDIO_H
15 #define FLACAUDIO_H
16 
17 #include "pandabase.h"
18 #include "movieAudio.h"
19 
20 class FlacAudioCursor;
21 
22 /**
23  * Reads FLAC audio files. Ogg-encapsulated FLAC files are not supported.
24  *
25  * @since 1.10.0
26  */
27 class EXPCL_PANDA_MOVIES FlacAudio : public MovieAudio {
28 PUBLISHED:
29  FlacAudio(const Filename &name);
30  virtual ~FlacAudio();
31  virtual PT(MovieAudioCursor) open();
32 
33  static PT(MovieAudio) make(const Filename &name);
34 
35 private:
36  friend class FlacAudioCursor;
37 
38 public:
39  static TypeHandle get_class_type() {
40  return _type_handle;
41  }
42  static void init_type() {
43  MovieAudio::init_type();
44  register_type(_type_handle, "FlacAudio",
45  MovieAudio::get_class_type());
46  }
47  virtual TypeHandle get_type() const {
48  return get_class_type();
49  }
50  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
51 
52 private:
53  static TypeHandle _type_handle;
54 };
55 
56 #endif // FLACAUDIO_H
Implements decoding of FLAC audio files.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
Definition: register_type.I:22
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
The name of a file, such as a texture file or an Egg file.
Definition: filename.h:39
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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:81
A MovieAudio is actually any source that provides a sequence of audio samples.
Definition: movieAudio.h:44
Reads FLAC audio files.
Definition: flacAudio.h:27