root/trunk/sound.d

Revision 5, 0.9 kB (checked in by aliloko, 7 months ago)

First commit

  • Property svn:executable set to *
Line 
1 module sound;
2
3 import util.al.device;
4 import util.al.context;
5 import util.al.common;
6 import util.al.listener;
7 import util.geometry;
8 import util.al.source;
9 import util.al.buffer;
10 import util.soundemitter;
11
12 class SoundManager {
13    
14     private {
15        
16         ALDevice device;
17         ALContext context; 
18         ALListener listener;   
19        
20     }
21    
22     public {
23        
24         this(int frequency) {
25            
26             device = new ALDevice();
27             context = new ALContext(device,frequency);
28             listener = new ALListener();
29             context.use();
30            
31         }
32        
33        
34         ~this() {
35            
36             delete context;
37             delete device;
38             delete listener;
39            
40         }
41        
42        
43         void printInfo() {
44        
45             printf("OpenAL info :"\n);
46             printf("  - version    : %s"\n, alVersion());
47             printf("  - vendor     : %s"\n, alVendor());
48             printf("  - renderer   : %s"\n, alRenderer());
49             printf("  - extensions : %s"\n, alExtensions());           
50            
51         }
52        
53     }
54    
55 }
Note: See TracBrowser for help on using the browser.