Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Changed the app name and adjusted formatting.

  • Loading branch information...
commit 152c5aa090a7e536710c895e1679c144aef75b7d 1 parent 576145a
kevinmcdonagh authored
2  res/values/strings.xml
... ... @@ -1,7 +1,7 @@
1 1 <?xml version="1.0" encoding="utf-8"?>
2 2 <resources>
3 3 <string name="label">Record a sound</string>
4   - <string name="app_name">Meuh</string>
  4 + <string name="app_name">la-boite-a-meuh</string>
5 5 <string name="title_choose_sound">Choose your Mooo Sound!</string>
6 6 <string name="dialog_ok">Ok</string>
7 7 <string name="dialog_cancel">Cancel</string>
2  src/com/novoda/meuh/media/MeuhSound.java
@@ -27,7 +27,7 @@
27 27
28 28 private static final int DEFAULT_RATE = 22050;
29 29
30   - private static final String TAG = "meuh:";
  30 + private static final String TAG = "[MeuhSound]";
31 31
32 32 // Have to be cast to int as we won't play huge files
33 33 private int fileLength;
15 src/com/novoda/meuh/media/SoundPoolMgr.java
@@ -22,13 +22,13 @@
22 22 import com.novoda.meuh.R;
23 23
24 24 public class SoundPoolMgr {
25   - private static final String TAG = "[Moo-SoundPoolMgr]:";
  25 + private static final String TAG = "[SoundPoolMgr]:";
26 26
27 27 public static final int MOO_SOUND_1 = 1;
28 28 public static final int MOO_SOUND_2 = 2;
29   - public static final int CUSTOM_MOO_SOUND = 3;
  29 + public static final int CUSTOM_MOO_SOUND = 3;
30 30
31   - private boolean mEnabled = true;
  31 + private boolean mEnabled = true;
32 32 private Context mContext;
33 33 private SoundPool mSoundPool;
34 34 private HashMap<Integer, Integer> mSoundPoolMap;
@@ -38,8 +38,8 @@
38 38
39 39 public SoundPoolMgr(Context context) {
40 40 this.mContext = context;
41   -
42   - if(SELECTED_MOO_FILE==null){
  41 +
  42 + if (SELECTED_MOO_FILE == null) {
43 43 SELECTED_MOO_SOUND = MOO_SOUND_1;
44 44 }
45 45 }
@@ -48,12 +48,12 @@ public void init() {
48 48 if (mEnabled) {
49 49 Log.d(TAG, "Initializing new SoundPool");
50 50
51   - release();
  51 + release();
52 52 mSoundPool = new SoundPool(3, AudioManager.STREAM_MUSIC, 0);
53 53 mSoundPoolMap = new HashMap<Integer, Integer>();
54 54 mSoundPoolMap.put(MOO_SOUND_1, mSoundPool.load(mContext, R.raw.carlthecow, 1));
55 55 mSoundPoolMap.put(MOO_SOUND_2, mSoundPool.load(mContext, R.raw.kevinthecow, 1));
56   -
  56 +
57 57 if (SELECTED_MOO_SOUND == CUSTOM_MOO_SOUND) {
58 58 mSoundPoolMap.put(CUSTOM_MOO_SOUND, mSoundPool.load(SELECTED_MOO_FILE, 1));
59 59 }
@@ -85,7 +85,6 @@ public void playSound(float speed) {
85 85 }
86 86 }
87 87 }
88   -
89 88
90 89 public void setEnabled(boolean enabled) {
91 90 this.mEnabled = enabled;

0 comments on commit 152c5aa

Please sign in to comment.
Something went wrong with that request. Please try again.