Follow-up to #27.

- Removed 'isSpinner' field from GameData.hitResult() since it's now being passed the full OsuHitObject.
- Minor Javadoc fixes.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
Jeffrey Han
2015-03-01 13:58:03 -05:00
parent 33e880df77
commit 4bf5943ee0
8 changed files with 57 additions and 62 deletions

View File

@@ -75,7 +75,7 @@ public enum HitSound implements SoundController.SoundComponent {
/** Current default sample set. */
private static SampleSet currentDefaultSampleSet = SampleSet.NORMAL;
/** The file name. */
private String filename;
@@ -130,7 +130,7 @@ public enum HitSound implements SoundController.SoundComponent {
/**
* Sets the default sample set to use when playing hit sounds.
* @param sampleSet the sample set (0:auto, 1:normal, 2:soft, 3:drum)
* @param sampleType the sample set (0:auto, 1:normal, 2:soft, 3:drum)
*/
public static void setDefaultSampleSet(byte sampleType) {
currentDefaultSampleSet = SampleSet.NORMAL;
@@ -141,6 +141,7 @@ public enum HitSound implements SoundController.SoundComponent {
}
}
}
/**
* Sets the sample set to use when playing hit sounds.
* @param sampleType the sample set (0:auto, 1:normal, 2:soft, 3:drum)
@@ -154,6 +155,4 @@ public enum HitSound implements SoundController.SoundComponent {
}
}
}
}

View File

@@ -96,9 +96,9 @@ public class SoundController {
audioIn = decodedAudioIn;
}
DataLine.Info info = new DataLine.Info(Clip.class, format);
if(AudioSystem.isLineSupported(info)){
if (AudioSystem.isLineSupported(info)) {
return new MultiClip(ref, audioIn);
}else{
} else {
// try to find closest matching line
Clip clip = AudioSystem.getClip();
AudioFormat[] formats = ((DataLine.Info) clip.getLineInfo()).getFormats();
@@ -251,6 +251,8 @@ public class SoundController {
/**
* Plays hit sound(s) using an OsuHitObject bitmask.
* @param hitSound the hit sound (bitmask)
* @param sampleSet the sample set
* @param additionSampleSet the 'addition' sample set
*/
public static void playHitSound(byte hitSound, byte sampleSet, byte additionSampleSet) {
if (hitSound < 0)
@@ -263,7 +265,7 @@ public class SoundController {
// play all sounds
HitSound.setSampleSet(sampleSet);
playClip(HitSound.NORMAL.getClip(), volume);
HitSound.setSampleSet(additionSampleSet);
if ((hitSound & OsuHitObject.SOUND_WHISTLE) > 0)
playClip(HitSound.WHISTLE.getClip(), volume);