Panda3D
Loading...
Searching...
No Matches
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
20class FlacAudioCursor;
21
22/**
23 * Reads FLAC audio files. Ogg-encapsulated FLAC files are not supported.
24 *
25 * @since 1.10.0
26 */
27class EXPCL_PANDA_MOVIES FlacAudio : public MovieAudio {
28PUBLISHED:
29 FlacAudio(const Filename &name);
30 virtual ~FlacAudio();
31 virtual PT(MovieAudioCursor) open();
32
33 static PT(MovieAudio) make(const Filename &name);
34
35private:
36 friend class FlacAudioCursor;
37
38public:
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
52private:
53 static TypeHandle _type_handle;
54};
55
56#endif // FLACAUDIO_H
The name of a file, such as a texture file or an Egg file.
Definition filename.h:44
Implements decoding of FLAC audio files.
Reads FLAC audio files.
Definition flacAudio.h:27
A MovieAudio is actually any source that provides a sequence of audio samples.
A MovieAudio is actually any source that provides a sequence of audio samples.
Definition movieAudio.h:44
TypeHandle is the identifier used to differentiate C++ class types.
Definition typeHandle.h:81
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...