Panda3D
 All Classes Functions Variables Enumerations
globalMilesManager.I
1 // Filename: globalMilesManager.I
2 // Created by: drose (30Jul07)
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 
16 ////////////////////////////////////////////////////////////////////
17 // Function: GlobalMilesManager::is_open
18 // Access: Public
19 // Description: Returns true if the Miles Sound System is open (and
20 // active), false if it is not.
21 ////////////////////////////////////////////////////////////////////
22 INLINE bool GlobalMilesManager::
23 is_open() const {
24  return _is_open;
25 }
26 
27 ////////////////////////////////////////////////////////////////////
28 // Function: GlobalMilesManager::get_num_samples
29 // Access: Public
30 // Description: Returns the number of sample handles that have been
31 // allocated.
32 ////////////////////////////////////////////////////////////////////
33 INLINE int GlobalMilesManager::
34 get_num_samples() const {
35  LightMutexHolder holder(_samples_lock);
36  return _samples.size();
37 }
38 
39 ////////////////////////////////////////////////////////////////////
40 // Function: GlobalMilesManager::get_num_sequences
41 // Access: Public
42 // Description: Returns the number of sequence handles that have been
43 // allocated.
44 ////////////////////////////////////////////////////////////////////
45 INLINE int GlobalMilesManager::
46 get_num_sequences() const {
47  LightMutexHolder holder(_sequences_lock);
48  return _sequences.size();
49 }
Similar to MutexHolder, but for a light mutex.