Hi,
I am making a piano app in android.

I want to record the sounds maked by user when he plays the piano.

I load sounds in a soundPool like:

private void chargeSounds() {
        this.soundPool = new SoundPool(12, AudioManager.STREAM_MUSIC, 0);
        this.soundPool.setOnLoadCompleteListener(new 
OnLoadCompleteListener() {

            @Override
            public void onLoadComplete(SoundPool soundPool, int sampleId,
                    int status) {
                MainActivity.this.loaded = true;
            }
        });

        this.soundID[0] = soundPool.load(this, R.raw.dob, 1);
        this.soundID[1] = soundPool.load(this, R.raw.rebbem, 1);
        this.soundID[2] = soundPool.load(this, R.raw.reb, 1);
        this.soundID[3] = soundPool.load(this, R.raw.mibbem, 1);

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to