@@ -583,7 +583,7 @@ public void play() throws StreamPlayerException {
583583 try {
584584 initLine ();
585585 } catch (final LineUnavailableException ex ) {
586- throw new StreamPlayerException (StreamPlayerException . PlayerException .CAN_NOT_INIT_LINE , ex );
586+ throw new StreamPlayerException (PlayerException .CAN_NOT_INIT_LINE , ex );
587587 }
588588
589589 // Open the sourceDataLine
@@ -666,7 +666,7 @@ private void awaitTermination() {
666666 Thread .sleep (20 );
667667 else
668668 break ;
669- System . out . println ( "StreamPlayer Future is not yet done..." );
669+ logger . log ( Level . INFO , "StreamPlayer Future is not yet done..." );
670670 }
671671
672672 } catch (final InterruptedException ex ) {
@@ -708,7 +708,7 @@ public long seekBytes(final long bytes) throws StreamPlayerException {
708708
709709 // Check if the requested bytes are more than totalBytes of Audio
710710 final long bytesLength = getTotalBytes ();
711- System . out . println ( "Bytes: " + bytes + " BytesLength: " + bytesLength );
711+ logger . log ( Level . INFO , "Bytes: " + bytes + " BytesLength: " + bytesLength );
712712 if ((bytesLength <= 0 ) || (bytes >= bytesLength )) {
713713 generateEvent (Status .EOM , getEncodedStreamPosition (), null );
714714 return totalSkipped ;
@@ -734,7 +734,7 @@ public long seekBytes(final long bytes) throws StreamPlayerException {
734734 logger .info ("Skipped : " + totalSkipped + "/" + bytes );
735735 if (totalSkipped == -1 )
736736 throw new StreamPlayerException (
737- StreamPlayerException . PlayerException .SKIP_NOT_SUPPORTED );
737+ PlayerException .SKIP_NOT_SUPPORTED );
738738
739739 logger .info ("Skeeping:" + totalSkipped );
740740 }
@@ -1281,7 +1281,7 @@ public void setBalance(final float fBalance) {
12811281 balanceControl .setValue (fBalance );
12821282 else
12831283 try {
1284- throw new StreamPlayerException (StreamPlayerException . PlayerException .BALANCE_CONTROL_NOT_SUPPORTED );
1284+ throw new StreamPlayerException (PlayerException .BALANCE_CONTROL_NOT_SUPPORTED );
12851285 } catch (final StreamPlayerException ex ) {
12861286 logger .log (Level .WARNING , ex .getMessage (), ex );
12871287 }
@@ -1387,4 +1387,7 @@ public boolean isSeeking() {
13871387 return status == Status .SEEKING ;
13881388 }
13891389
1390+ Logger getLogger () {
1391+ return logger ;
1392+ }
13901393}
0 commit comments