-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add stub classes of com.jblend.media.smaf.phrase
- Loading branch information
Showing
10 changed files
with
394 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Copyright 2023 Yury Kharchenko | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.j_phone.system; | ||
|
||
import javax.microedition.lcdui.keyboard.VirtualKeyboard; | ||
import javax.microedition.util.ContextHolder; | ||
|
||
public class DeviceControl { | ||
private static final DeviceControl deviceControl = new DeviceControl(); | ||
|
||
public static DeviceControl getDefaultDeviceControl() { | ||
return deviceControl; | ||
} | ||
|
||
public int getDeviceState(int device) { | ||
if (device != 3) { | ||
return 0; | ||
} | ||
VirtualKeyboard vk = ContextHolder.getVk(); | ||
if (vk == null) return 0; | ||
return vk.getKeyStatesVodafone(); | ||
} | ||
|
||
public boolean setDeviceActive(int device, boolean active) { | ||
return true; | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
app/src/main/java/com/jblend/media/smaf/phrase/AudioPhrase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright 2023 Yury Kharchenko | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.jblend.media.smaf.phrase; | ||
|
||
import java.io.IOException; | ||
|
||
public class AudioPhrase extends PhraseBase { | ||
public AudioPhrase(byte[] data) { | ||
super(data); | ||
} | ||
|
||
public AudioPhrase(String url) throws IOException { | ||
super(url); | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
app/src/main/java/com/jblend/media/smaf/phrase/AudioPhraseTrack.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright 2023 Yury Kharchenko | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.jblend.media.smaf.phrase; | ||
|
||
public class AudioPhraseTrack extends PhraseTrackBase { | ||
private AudioPhrase phrase; | ||
|
||
AudioPhraseTrack(int id) { | ||
super(id); | ||
} | ||
|
||
public void setPhrase(AudioPhrase p) { | ||
phrase = p; | ||
} | ||
|
||
public AudioPhrase getPhrase() { | ||
return phrase; | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
app/src/main/java/com/jblend/media/smaf/phrase/Phrase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright 2023 Yury Kharchenko | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.jblend.media.smaf.phrase; | ||
|
||
import java.io.IOException; | ||
|
||
public class Phrase extends PhraseBase { | ||
public Phrase(byte[] data) { | ||
super(data); | ||
} | ||
|
||
public Phrase(String url) throws IOException { | ||
super(url); | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
app/src/main/java/com/jblend/media/smaf/phrase/PhraseBase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright 2023 Yury Kharchenko | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.jblend.media.smaf.phrase; | ||
|
||
import java.io.IOException; | ||
|
||
abstract class PhraseBase { | ||
public PhraseBase(byte[] data) {} | ||
|
||
public PhraseBase(String url) throws IOException {} | ||
|
||
public int getSize() { | ||
return 0; | ||
} | ||
|
||
public int getUseTracks() { | ||
return 0; | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
app/src/main/java/com/jblend/media/smaf/phrase/PhraseEventType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* Copyright 2023 Yury Kharchenko | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.jblend.media.smaf.phrase; | ||
|
||
public interface PhraseEventType { | ||
int EV_END = -1; | ||
int EV_LOOP = -2; | ||
int EV_PAUSE = -3; | ||
int EV_USER_0 = 0; | ||
int EV_USER_1 = 1; | ||
int EV_USER_2 = 2; | ||
int EV_USER_3 = 3; | ||
int EV_USER_4 = 4; | ||
int EV_USER_5 = 5; | ||
int EV_USER_6 = 6; | ||
int EV_USER_7 = 7; | ||
int EV_USER_8 = 8; | ||
int EV_USER_9 = 9; | ||
int EV_USER_10 = 10; | ||
int EV_USER_11 = 11; | ||
int EV_USER_12 = 12; | ||
int EV_USER_13 = 13; | ||
int EV_USER_14 = 14; | ||
int EV_USER_15 = 15; | ||
} |
64 changes: 64 additions & 0 deletions
64
app/src/main/java/com/jblend/media/smaf/phrase/PhrasePlayer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* | ||
* Copyright 2023 Yury Kharchenko | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.jblend.media.smaf.phrase; | ||
|
||
public class PhrasePlayer { | ||
private static final PhrasePlayer phrasePlayer = new PhrasePlayer(); | ||
|
||
protected int trackCount; | ||
protected int audioTrackCount; | ||
|
||
public static PhrasePlayer getPlayer() { | ||
return phrasePlayer; | ||
} | ||
|
||
public void disposePlayer() {} | ||
|
||
public PhraseTrack getTrack() { | ||
return new PhraseTrack(trackCount++); | ||
} | ||
|
||
public AudioPhraseTrack getAudioTrack() { | ||
return new AudioPhraseTrack(audioTrackCount++); | ||
} | ||
|
||
public int getTrackCount() { | ||
return 16; | ||
} | ||
|
||
public int getAudioTrackCount() { | ||
return 16; | ||
} | ||
|
||
public PhraseTrack getTrack(int track) { | ||
return null; | ||
} | ||
|
||
public AudioPhraseTrack getAudioTrack(int track) { | ||
return null; | ||
} | ||
|
||
public void disposeTrack(PhraseTrack t) {} | ||
|
||
public void disposeAudioTrack(AudioPhraseTrack t) {} | ||
|
||
public void kill() {} | ||
|
||
public void pause() {} | ||
|
||
public void resume() {} | ||
} |
37 changes: 37 additions & 0 deletions
37
app/src/main/java/com/jblend/media/smaf/phrase/PhraseTrack.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Copyright 2023 Yury Kharchenko | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.jblend.media.smaf.phrase; | ||
|
||
public class PhraseTrack extends PhraseTrackBase { | ||
PhraseTrack(int id) { | ||
super(id); | ||
} | ||
|
||
public void setPhrase(Phrase p) {} | ||
|
||
public Phrase getPhrase() { | ||
return null; | ||
} | ||
|
||
public void removePhrase() {} | ||
|
||
public void setSubjectTo(PhraseTrack master) {} | ||
|
||
public PhraseTrack getSyncMaster() { | ||
return null; | ||
} | ||
} |
68 changes: 68 additions & 0 deletions
68
app/src/main/java/com/jblend/media/smaf/phrase/PhraseTrackBase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* | ||
* Copyright 2023 Yury Kharchenko | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.jblend.media.smaf.phrase; | ||
|
||
abstract class PhraseTrackBase { | ||
public static final int NO_DATA = 1; | ||
public static final int READY = 2; | ||
public static final int PLAYING = 3; | ||
public static final int PAUSED = 5; | ||
public static final int DEFAULT_VOLUME = 100; | ||
public static final int DEFAULT_PANPOT = 64; | ||
|
||
PhraseTrackBase(int id) {} | ||
|
||
public void removePhrase() {} | ||
|
||
public void play() {} | ||
|
||
public void play(int loop) {} | ||
|
||
public void stop() {} | ||
|
||
public void pause() {} | ||
|
||
public void resume() {} | ||
|
||
public int getState() { | ||
return PLAYING; | ||
} | ||
|
||
public void setVolume(int value) {} | ||
|
||
public int getVolume() { | ||
return 0; | ||
} | ||
|
||
public void setPanpot(int value) {} | ||
|
||
public int getPanpot() { | ||
return 0; | ||
} | ||
|
||
public void mute(boolean mute) {} | ||
|
||
public boolean isMute() { | ||
return true; | ||
} | ||
|
||
public int getID() { | ||
return 0; | ||
} | ||
|
||
public void setEventListener(PhraseTrackListener l) {} | ||
} |
Oops, something went wrong.