mirror of
https://github.com/jneug/zeichenmaschine.git
synced 2026-04-14 14:43:33 +02:00
eventDispatch nur nach initialisierung aufrufen
This commit is contained in:
@@ -194,7 +194,9 @@ public class Music implements Audio {
|
|||||||
private void stream() {
|
private void stream() {
|
||||||
audioLine.start();
|
audioLine.start();
|
||||||
playing = true;
|
playing = true;
|
||||||
|
if( eventDispatcher != null ) {
|
||||||
eventDispatcher.dispatchEvent("start", Music.this);
|
eventDispatcher.dispatchEvent("start", Music.this);
|
||||||
|
}
|
||||||
|
|
||||||
byte[] bytesBuffer = new byte[BUFFER_SIZE];
|
byte[] bytesBuffer = new byte[BUFFER_SIZE];
|
||||||
int bytesRead = -1;
|
int bytesRead = -1;
|
||||||
@@ -221,8 +223,10 @@ public class Music implements Audio {
|
|||||||
|
|
||||||
playing = false;
|
playing = false;
|
||||||
streamingStopped();
|
streamingStopped();
|
||||||
|
if( eventDispatcher != null ) {
|
||||||
eventDispatcher.dispatchEvent("stop", Music.this);
|
eventDispatcher.dispatchEvent("stop", Music.this);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private boolean openLine() {
|
private boolean openLine() {
|
||||||
if( audioLine != null ) {
|
if( audioLine != null ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user