blob: c66f2059100ee9d20ac055a469fb33e86cd66652 (
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
|
/* */ package NET.worlds.scape;
/* */
/* */ import NET.worlds.network.URL;
/* */
/* */
/* */
/* */
/* */
/* */ public class ASFSoundPlayer
/* */ extends MCISoundPlayer
/* */ {
/* */ float ang;
/* */ float dist;
/* */ float vol;
/* */ int leftToRepeat;
/* */ int running;
/* */ private URL url;
/* */
/* */ public ASFSoundPlayer(Sound owner)
/* */ {
/* 21 */ super(owner);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public boolean open(float volume, float stopDist, boolean atten, boolean pan)
/* */ {
/* 31 */ return true;
/* */ }
/* */
/* */ public void close() {
/* 35 */ stop();
/* */ }
/* */
/* */ public boolean position(Point3Temp cam, Point3Temp obj, Point3Temp out, Point3Temp up)
/* */ {
/* 40 */ Point3Temp toObj = Point3Temp.make(obj).minus(cam);
/* 41 */ Point3Temp right = Point3Temp.make(out).cross(up);
/* 42 */ float y = toObj.dot(out);
/* 43 */ float x = toObj.dot(right);
/* 44 */ this.ang = ((float)(Math.atan2(y, x) / 3.141592653589793D));
/* 45 */ this.dist = toObj.length();
/* */
/* */
/* 48 */ return setVolume(this.vol);
/* */ }
/* */
/* */ public boolean setVolume(float v) {
/* 52 */ return true;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public int getState()
/* */ {
/* 68 */ gotFinished(!ASFThread.isActive());
/* */
/* 70 */ return this.running != 0 ? 0 : 1;
/* */ }
/* */
/* */ public synchronized void start(int repeatCount) {
/* 74 */ if (repeatCount == 0) {
/* 75 */ this.running = 0;
/* 76 */ return;
/* */ }
/* */
/* 79 */ this.leftToRepeat = repeatCount;
/* */
/* 81 */ if (this.leftToRepeat > 0) {
/* 82 */ this.leftToRepeat -= 1;
/* */ }
/* 84 */ this.running = 1;
/* */
/* */
/* 87 */ URL myURL = this.owner == null ? this.url : this.owner.getURL();
/* 88 */ this.running = 2;
/* 89 */ new ASFThread(myURL, this);
/* */ }
/* */
/* */
/* */ public synchronized void start(URL u)
/* */ {
/* 95 */ this.url = u;
/* 96 */ start(1);
/* */ }
/* */
/* */ public static void pauseSystem() {
/* 100 */ ASFThread.pauseASF();
/* 101 */ WavSoundPlayer.pauseSystemExceptASF();
/* */ }
/* */
/* */ public static void resumeSystem() {
/* 105 */ ASFThread.resumeASF();
/* 106 */ WavSoundPlayer.resumeSystemExceptASF();
/* */ }
/* */
/* */ synchronized void gotFinished(boolean f)
/* */ {
/* 111 */ if ((f) &&
/* 112 */ (this.running == 2)) {
/* 113 */ start(this.leftToRepeat);
/* */ }
/* */ }
/* */
/* */ public synchronized void stop() {
/* 118 */ this.leftToRepeat = 0;
/* 119 */ ASFThread.stopASF();
/* */ }
/* */
/* */ public void volume(float left, float right) {}
/* */
/* */ public static synchronized boolean isActive() {
/* 125 */ return ASFThread.isActive();
/* */ }
/* */
/* */ static synchronized void shutdown() {}
/* */
/* */ static native boolean nativePlay(String paramString);
/* */ }
/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ASFSoundPlayer.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|