Panda3D
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 
19 TypeHandle 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  */
27 MovieAudio(const std::string &name) :
28  Namable(name)
29 {
30 }
31 
32 /**
33  *
34  */
35 MovieAudio::
36 ~MovieAudio() {
37 }
38 
39 /**
40  * Open this audio, returning a MovieAudioCursor
41  */
42 PT(MovieAudioCursor) MovieAudio::
43 open() {
44  return new MovieAudioCursor(this);
45 }
46 
47 /**
48  * Obtains a MovieAudio that references a file. Just calls
49  * MovieTypeRegistry::make_audio().
50  */
51 PT(MovieAudio) MovieAudio::
52 get(const Filename &name) {
54  return reg->make_audio(name);
55 }
This class records the different types of MovieAudio and MovieVideo that are available for loading.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A base class for all things which can have a name.
Definition: namable.h:26
PT(MovieAudioCursor) MovieAudio
Open this audio, returning a MovieAudioCursor.
Definition: movieAudio.cxx:42
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
MovieAudio(const std::string &name="Blank Audio")
This constructor returns a null audio stream — a stream of total silence, at 8000 samples per second.
Definition: movieAudio.cxx:27
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static MovieTypeRegistry * get_global_ptr()
Returns a pointer to the global MovieTypeRegistry instance.
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