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