summaryrefslogtreecommitdiff
path: root/NET/worlds/scape/WMPSoundPlayer.java
blob: c8dbd82f7db3eb6ec3a3108dc5d7f9ed8716d6ab (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/*    */ package NET.worlds.scape;
/*    */ 
/*    */ import NET.worlds.console.WebControlImp;
/*    */ import NET.worlds.network.URL;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class WMPSoundPlayer
/*    */   extends SoundPlayer
/*    */ {
/*    */   protected DirectShow ds;
/*    */   protected boolean disabled;
/*    */   
/*    */   public WMPSoundPlayer(Sound owner)
/*    */   {
/* 28 */     super(owner);
/* 29 */     this.ds = new DirectShow();
/*    */   }
/*    */   
/* 32 */   static int activeCount = 0;
/* 33 */   boolean playing = false;
/*    */   
/*    */   public static boolean isActive()
/*    */   {
/* 37 */     return activeCount > 0;
/*    */   }
/*    */   
/*    */ 
/*    */   public boolean open(float volume, float stopDist, boolean atten, boolean pan)
/*    */   {
/* 43 */     return true;
/*    */   }
/*    */   
/*    */   public void start(int repeat)
/*    */   {
/* 48 */     String megaURL = this.owner.getURL().toString();
/* 49 */     megaURL = WebControlImp.processURL(megaURL);
/*    */     
/* 51 */     this.ds.nOpen(URL.make(megaURL).unalias());
/* 52 */     activeCount += 1;
/* 53 */     this.ds.nPlay(repeat);
/* 54 */     this.playing = true;
/*    */   }
/*    */   
/*    */ 
/*    */   public boolean position(Point3Temp cam, Point3Temp obj, Point3Temp out, Point3Temp up)
/*    */   {
/* 60 */     return true;
/*    */   }
/*    */   
/*    */   public int getState()
/*    */   {
/* 65 */     int nativeState = this.ds.nTick();
/* 66 */     return nativeState == 3 ? 0 : 1;
/*    */   }
/*    */   
/*    */   public void stop()
/*    */   {
/* 71 */     this.ds.nStop();
/* 72 */     activeCount -= 1;
/* 73 */     this.playing = false;
/*    */   }
/*    */   
/*    */   public void close()
/*    */   {
/* 78 */     if (this.playing) {
/* 79 */       stop();
/*    */     }
/*    */   }
/*    */   
/*    */   public boolean setVolume(float v) {
/* 84 */     return true;
/*    */   }
/*    */ }


/* Location:              C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\WMPSoundPlayer.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */