Panda3D
 All Classes Functions Variables Enumerations
movieAudio.cxx
1 // Filename: movieAudio.cxx
2 // Created by: jyelon (02Jul07)
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 #include "movieAudio.h"
16 #include "movieAudioCursor.h"
17 #include "config_movies.h"
18 #include "movieTypeRegistry.h"
19 
20 TypeHandle MovieAudio::_type_handle;
21 
22 ////////////////////////////////////////////////////////////////////
23 // Function: MovieAudio::Constructor
24 // Access: Public
25 // Description: This constructor returns a null audio stream --- a
26 // stream of total silence, at 8000 samples per second.
27 // To get more interesting audio, you need to construct
28 // a subclass of this class.
29 ////////////////////////////////////////////////////////////////////
31 MovieAudio(const string &name) :
32  Namable(name)
33 {
34 }
35 
36 ////////////////////////////////////////////////////////////////////
37 // Function: MovieAudio::Destructor
38 // Access: Public, Virtual
39 // Description:
40 ////////////////////////////////////////////////////////////////////
41 MovieAudio::
42 ~MovieAudio() {
43 }
44 
45 ////////////////////////////////////////////////////////////////////
46 // Function: MovieAudio::open
47 // Access: Published, Virtual
48 // Description: Open this audio, returning a MovieAudioCursor
49 ////////////////////////////////////////////////////////////////////
51 open() {
52  return new MovieAudioCursor(this);
53 }
54 
55 ////////////////////////////////////////////////////////////////////
56 // Function: MovieAudio::get
57 // Access: Published, Static
58 // Description: Obtains a MovieAudio that references a file.
59 // Just calls MovieTypeRegistry::make_audio().
60 ////////////////////////////////////////////////////////////////////
62 get(const Filename &name) {
64  return reg->make_audio(name);
65 }
This class records the different types of MovieAudio and MovieVideo that are available for loading...
MovieAudio(const string &name="Blank Audio")
This constructor returns a null audio stream — a stream of total silence, at 8000 samples per second...
Definition: movieAudio.cxx:31
A base class for all things which can have a name.
Definition: namable.h:29
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.
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:85
A MovieAudio is actually any source that provides a sequence of audio samples.
Definition: movieAudio.h:48