-
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.
- Loading branch information
Alexander James Wallar
committed
Jan 28, 2014
1 parent
649e063
commit 84945c3
Showing
6 changed files
with
154 additions
and
125 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
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,47 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" | ||
android:orientation="vertical" > | ||
|
||
|
||
<EditText | ||
android:id="@+id/editText" | ||
android:hint="Enter some thing" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" > | ||
|
||
<requestFocus /> | ||
</EditText> | ||
|
||
<LinearLayout | ||
|
||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:orientation="horizontal" | ||
|
||
android:layout_marginTop="10dp"> | ||
|
||
|
||
<Button | ||
android:id="@+id/save" | ||
android:layout_marginTop="15dp" | ||
android:layout_weight="1" | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:text="SAVE" | ||
/> | ||
|
||
<Button | ||
android:id="@+id/cancel" | ||
android:layout_marginTop="15dp" | ||
android:layout_weight="1" | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:text="Cancel" | ||
/> | ||
|
||
</LinearLayout> | ||
|
||
|
||
</LinearLayout> |
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,44 @@ | ||
package com.locaudio.api; | ||
|
||
import android.content.Context; | ||
import android.os.Looper; | ||
|
||
import com.locaudio.functional.UIFunction; | ||
import com.locaudio.io.WaveWriter; | ||
import com.musicg.wave.Wave; | ||
|
||
public class AcquisitionThread extends Thread { | ||
|
||
private static final int RECORD_LENGTH = 5; | ||
|
||
private Locaudio locaudio; | ||
private UIFunction<NotifyResponse> postCallback; | ||
private Context context; | ||
private boolean shouldContinue; | ||
|
||
public AcquisitionThread(Locaudio locaudio, Context context, | ||
UIFunction<NotifyResponse> postCallback) { | ||
//super(); | ||
this.locaudio = locaudio; | ||
this.context = context; | ||
this.postCallback = postCallback; | ||
this.shouldContinue = true; | ||
} | ||
|
||
public void kill() { | ||
this.shouldContinue = false; | ||
} | ||
|
||
@Override | ||
public void run() { | ||
Looper.prepare(); | ||
while (this.shouldContinue) { | ||
|
||
Wave wave = WaveWriter.record(RECORD_LENGTH); | ||
|
||
locaudio.notifyEvent(this.context, wave, this.postCallback); | ||
|
||
} | ||
} | ||
|
||
} |
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
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
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