Panda3D
Loading...
Searching...
No Matches
movieAudio.cxx
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 movieAudio.cxx
10 * @author jyelon
11 * @date 2007-07-02
12 */
13
14#include "movieAudio.h"
15#include "movieAudioCursor.h"
16#include "config_movies.h"
17#include "movieTypeRegistry.h"
18
19TypeHandle MovieAudio::_type_handle;
20
21/**
22 * This constructor returns a null audio stream --- a stream of total silence,
23 * at 8000 samples per second. To get more interesting audio, you need to
24 * construct a subclass of this class.
25 */
27MovieAudio(const std::string &name) :
28 Namable(name)
29{
30}
31
32/**
33 *
34 */
35MovieAudio::
36~MovieAudio() {
37}
38
39/**
40 * Open this audio, returning a MovieAudioCursor
41 */
42PT(MovieAudioCursor) MovieAudio::
43open() {
44 return new MovieAudioCursor(this);
45}
46
47/**
48 * Obtains a MovieAudio that references a file. Just calls
49 * MovieTypeRegistry::make_audio().
50 */
51PT(MovieAudio) MovieAudio::
52get(const Filename &name) {
54 return reg->make_audio(name);
55}
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 MovieAudio is actually any source that provides a sequence of audio samples.
Definition movieAudio.h:44
MovieAudio(const std::string &name="Blank Audio")
This constructor returns a null audio stream — a stream of total silence, at 8000 samples per second.
This class records the different types of MovieAudio and MovieVideo that are available for loading.
static MovieTypeRegistry * get_global_ptr()
Returns a pointer to the global MovieTypeRegistry instance.
A base class for all things which can have a name.
Definition namable.h:26
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.