Play recorded sounds: Difference between revisions

m
→‎{{header|Wren}}: Changed to Wren S/H
(New post.)
m (→‎{{header|Wren}}: Changed to Wren S/H)
(One intermediate revision by one other user not shown)
Line 529:
case 2 -> resume();
case 3 -> restart();
case 4 -> jump();
case 4 -> { System.out.println("Select a time between 0 and " + clip.getMicrosecondLength());
final long request = scanner.nextLong();
jump(request);
}
case 5 -> stop();
case 6 -> quit();
Line 578 ⟶ 575:
}
private void jump(long aRequest) {
if System.out.println("Select aRequesta >time between 0 &&and aRequest" <+ clip.getMicrosecondLength() ); {
final long request = scanner.nextLong();
if ( request > 0 && request < clip.getMicrosecondLength() ) {
clip.stop();
clip.close();
resetAudioStream();
currentClipPosition = aRequestrequest;
clip.setMicrosecondPosition(currentClipPosition);
status = Status.PLAYING;
Line 1,299:
 
It is certainly suitable for game sound effects (it's a game engine) and can play music at CD quality as well.
<syntaxhighlight lang="ecmascriptwren">import "audio" for AudioEngine
import "dome" for Process
 
9,488

edits