Make sure we have clips before we try to pick one at random.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2379 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: SoundManager.java,v 1.55 2003/04/05 03:38:41 ray Exp $
|
// $Id: SoundManager.java,v 1.56 2003/04/05 19:00:28 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.media.sound;
|
package com.threerings.media.sound;
|
||||||
|
|
||||||
@@ -697,7 +697,7 @@ public class SoundManager
|
|||||||
_clipCache.put(key, data);
|
_clipCache.put(key, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
return data[RandomUtil.getInt(data.length)];
|
return (data.length > 0) ? data[RandomUtil.getInt(data.length)] : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected InputStream getTestClip (SoundKey key)
|
protected InputStream getTestClip (SoundKey key)
|
||||||
|
|||||||
Reference in New Issue
Block a user