[android-developers] Re: How to record multimedia audio
Help me please! -- 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
[android-developers] Re: How to record multimedia audio
I don´t know why my last 2 post were deleted :( I said in those posts: I dont want to record from voice sound,(voice,cars,birds at the park,my brother laughing) i only want to record multimedia sound from the app, not from mic. I want to record piano sound because later i want to play piano with this sound recorded for make more complicated songs. I want to use the recorded sound like chords. Must be a way to record only multimedia sound without outer sounds Have a nice day -- 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
[android-developers] How to record multimedia audio
Hello, I apologize for my English first. I am developing an android piano. I wonder how I can record the sounds that occurs when i touch the keys of the piano. I explain it: I load the sounds: 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); .. . Then, to record audio i have a button that launches myRecord: public void myRecord(View view) { mediaRecorder = new MediaRecorder(); // Create folder if no exists File file = new File(Environment.getExternalStorageDirectory() .getAbsolutePath() + /folder); if (!file.exists()) file.mkdirs(); mediaRecorder.setOutputFile(file + /audio1.3gp); mediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC); mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); mediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB); try { mediaRecorder.prepare(); } catch (IOException e) { Log.e(Record, Fail to record: + e.getMessage()); Toast toast = Toast.makeText(getApplicationContext(), e.getMessage(), Toast.LENGTH_LONG); toast.show(); } mediaRecorder.start(); this.btnGrabar.setBackgroundResource(R.drawable.record_on); } } With this code i can record the piano music and my voice, but i only what to record piano audio. Is there any way to record only the sound of the piano without voice? I have tried to set grabar function like: mediaRecorder.setAudioSource(AudioManager.STREAM_MUSIC); instead of: mediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC); but it blocks the app. Any suggestions? Thank you and Again apologies for my English. -- 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
[android-developers] Re: How to record multimedia audio
Yes, but couldn´t i record only the audio played by the user? And at any rate, when i record from AudioManager.STREAM_MUSIC the quality of recorded sound is horrible. Thanks for answering. -- 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
[android-developers] How to record media audio, AudioManager.STREAM_MUSIC
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