Mercurial > hg > pub > prymula > com
comparison kopieckreta/src/wavResource.java @ 23:489244127359
kopieckreta-0.240903-0
author | Przemyslaw <prymula76@outlook.com> |
---|---|
date | Mon, 01 Apr 2024 07:15:00 +0200 |
parents | 2787f5e749ae |
children |
comparison
equal
deleted
inserted
replaced
22:b0c59d056e73 | 23:489244127359 |
---|---|
36 try{ | 36 try{ |
37 InputStream is = getClass().getResourceAsStream(filename); | 37 InputStream is = getClass().getResourceAsStream(filename); |
38 InputStream bIn = new BufferedInputStream(is); | 38 InputStream bIn = new BufferedInputStream(is); |
39 ais = AudioSystem.getAudioInputStream(bIn); | 39 ais = AudioSystem.getAudioInputStream(bIn); |
40 | 40 |
41 if (PlayFlag) { // to musi być | 41 if (PlayFlag) { // to musi byc |
42 clip = AudioSystem.getClip(); | 42 clip = AudioSystem.getClip(); |
43 clip.open(ais); | 43 clip.open(ais); |
44 clip.start(); | 44 clip.start(); |
45 ais.mark(BUFFER_SIZE); // po odkomentowaniu clip ustawiony na poczatek | 45 ais.mark(BUFFER_SIZE); // po odkomentowaniu clip ustawiony na poczatek |
46 ais.reset(); | 46 ais.reset(); |