|
|
@ -12,7 +12,7 @@ public class UsbPlayer implements Device { |
|
|
|
private Boolean isConnected; |
|
|
|
private Boolean isDefect; |
|
|
|
int Lautstaerke = 0; |
|
|
|
int soundWas =-1; |
|
|
|
int soundWas = -1; |
|
|
|
|
|
|
|
public USB_Stick USBDrive = new USB_Stick(); |
|
|
|
|
|
|
@ -104,8 +104,8 @@ public class UsbPlayer implements Device { |
|
|
|
//**********search method************* |
|
|
|
@Override |
|
|
|
public void quieter() { |
|
|
|
if(this.soundWas == -1){ |
|
|
|
if (Lautstaerke > 0 ) { |
|
|
|
if (this.soundWas == -1) { |
|
|
|
if (Lautstaerke > 0) { |
|
|
|
Lautstaerke -= 1; |
|
|
|
} else { |
|
|
|
Lautstaerke = 0; |
|
|
@ -116,7 +116,7 @@ public class UsbPlayer implements Device { |
|
|
|
|
|
|
|
@Override |
|
|
|
public void louder() { |
|
|
|
if(this.soundWas == -1) { |
|
|
|
if (this.soundWas == -1) { |
|
|
|
if (Lautstaerke < 100) { |
|
|
|
Lautstaerke += 1; |
|
|
|
} else { |
|
|
@ -126,7 +126,7 @@ public class UsbPlayer implements Device { |
|
|
|
} |
|
|
|
|
|
|
|
public void Louder_10() { |
|
|
|
if(this.soundWas == -1) { |
|
|
|
if (this.soundWas == -1) { |
|
|
|
Lautstaerke += 10; |
|
|
|
if (Lautstaerke > 100) { |
|
|
|
Lautstaerke = 100; |
|
|
@ -136,7 +136,7 @@ public class UsbPlayer implements Device { |
|
|
|
} |
|
|
|
|
|
|
|
public void quieter_10() { |
|
|
|
if(this.soundWas == -1) { |
|
|
|
if (this.soundWas == -1) { |
|
|
|
Lautstaerke -= 10; |
|
|
|
if (Lautstaerke < 0) { |
|
|
|
Lautstaerke = 0; |
|
|
@ -168,12 +168,11 @@ public class UsbPlayer implements Device { |
|
|
|
|
|
|
|
@Override |
|
|
|
public String getInfoText() { |
|
|
|
String InfoText=""; |
|
|
|
String InfoText = ""; |
|
|
|
if (isAllAudio()) { |
|
|
|
InfoText="USB Player is on : "+this.getPlayTrack(); |
|
|
|
} |
|
|
|
else |
|
|
|
InfoText="USB Player with no Albums"; |
|
|
|
InfoText = "USB Player is on : " + this.getPlayTrack(); |
|
|
|
} else |
|
|
|
InfoText = "USB Player with no Albums"; |
|
|
|
return InfoText; |
|
|
|
} |
|
|
|
|
|
|
@ -184,9 +183,15 @@ public class UsbPlayer implements Device { |
|
|
|
|
|
|
|
@Override |
|
|
|
public String chooseItem(int itemNr) { |
|
|
|
return null; |
|
|
|
String songName=""; |
|
|
|
if (itemNr < this.getPlaylist().size()) { |
|
|
|
songName= this.getPlaylist().get(itemNr ).toString(); |
|
|
|
} |
|
|
|
return songName; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public String[] getItemList() { |
|
|
|
return null; |
|
|
|