audio-recording

How to record an FM audio in android?

陌路散爱 提交于 2019-11-29 15:18:09
问题 i need to record the songs being played by a FM app. I checked the MediaRecorder.AudioSource but could not find what to use for setAudioSource can anyone please help me? thanks, Ramachandran.R 回答1: There is no FM radio support in the Android SDK. Various device manufacturers may have hacked in their own FM radio support, but you would have to contact those manufacturers to learn what APIs, if any, they have for them. 回答2: try this code int audioSource = MediaRecorder.AudioSource.VOICE

Recording calls in android why this not works

纵饮孤独 提交于 2019-11-29 10:26:14
问题 I am starting a service from MainActivity, which run indefinitely looking for incoming and outgoing calls to record. Why is that the sample "switch-case" doesn't work? No error occurs but I can record only each of incoming and outgoing. The service is killed after recording the call, it will be recreated START_STICKY but never going to get started. Please help. Thanks in advance! Is there any other codes to record incoming and outgoing call in android? package com.exampled.demoserv; import

How to request run-time recording permission on Android 6.0?

淺唱寂寞╮ 提交于 2019-11-29 08:51:48
Since Android 6.0, we need to request permissions during app runtime. In my app, i'm using local storage, camera, geolocation and audio recording permissions. So, requesting for local storage, camera and geolocation is ok with that snippet : https://github.com/appcelerator-developer-relations/appc-sample-ti510/blob/master/app/controllers/permissions.js But i've not found how to request for audio recording permission...I actually use titutorial.audiorecorder module for Android and it crashes when i tried to record since Android 6.0 because permission for recording is not enable. More

Line stereo/2-channel recording

假如想象 提交于 2019-11-29 08:38:48
Are there any Android devices available that support multi-channel (stereo) recording via line-in? With the devices I tested (Nexus 4, HTC Buzz, Motorola Xoom ..), it is possible to set AudioFormat.CHANNEL_IN_STEREO, but I only receive one active channel. Is this a gerneral limitation of Android due to licensing issues or is this depending on the manufacturer/hardware, i.e. there is only one A/D converter for input or some such? Any experiences, thoughts or ideas on this topic? Are there any Android devices available that support multi-channel (stereo) recording via line-in? Concerning most

Audio Recording and Streaming in Android

泄露秘密 提交于 2019-11-29 08:35:29
I an developing an android app. I want to accomplish below feature. I will use my phone's built-in mic to record and at the same time i want the recorded audio to be played through either phone's speakers or headphones. Is it feasible? If yes, please help me in this. Saurabh Meshram Here is a simple Recording and Playback application. Uses Android AudioRecord and AudioTrack , Design : The recorded audio is written to a buffer and played back from the same buffer, This mechanism runs in a loop (using Android thread) controlled by buttons. Code private String TAG = "AUDIO_RECORD_PLAYBACK";

Why is it impossible to use the Speech Recorder on the Android emulator?

巧了我就是萌 提交于 2019-11-29 05:57:41
I am trying to run the Speech Recorder that comes with the Android 2.2 emulator. The problem is that the moment I click the "Record" button: It aborts with an error message "The application Speech Recorder (process com.android.speechrecorder) has stopped unexpectedly. Please try again." The problem is that trying again doesn't help. Now, I searched StackOverflow and I combed the entire Internet and I found many reports of the same problem, without any working solution. My conclusion is that, for some strange reason, the Android emulator is capable of using the Windows audio device for output,

How to pause/resume a recording created with mediarecorder?

不想你离开。 提交于 2019-11-29 05:16:41
I'm trying to pause a recording on an incoming call and resume it later. i'm using the andriod mediarecorder and trying to record in MPEG4 . I tried pause/resume with resetting/stopping a recording and starting it with the setOutputFile(fd) , fd being the filedescriptor of the audio file that was stopped/paused and hoped it would append but i had no luck. Is there a way to achieve this or append two recordings or should i give up on mediarecorder . code: private MediaRecorder media_recorder; private String file_path = null; public void startRecording(path) { file_path = path media_recorder=

How can I find out what Sampling rates are supported on my tablet?

纵然是瞬间 提交于 2019-11-29 04:14:15
问题 I have an app that works perfectly on a bunch of devices (Xoom, Xyboard, etc) but that fails at this line on the Galaxy 10.1 mrec.setAudioSamplingRate(44100); When I comment this line out, everything works swimmingly. (I'm not sure what rate it uses by default). My guess is that the device doesn't support this particular sample rate, but I'm not seeing anything in the docs for what method of what Object I can look to, to find out what the supported sample rates are. All help appreciated. 回答1:

Call recording with OpenSL

纵然是瞬间 提交于 2019-11-29 04:04:21
问题 I try to fix call recording in my app since lolipop update in my Galaxy S5. As a base I am using google sample project from here: Sample. And this is the main part of the code: AudioRecorder::AudioRecorder(SampleFormat *sampleFormat, SLEngineItf slEngine) :freeQueue_(nullptr), recQueue_(nullptr), devShadowQueue_(nullptr), callback_(nullptr) SLresult result; sampleInfo_ = *sampleFormat; SLAndroidDataFormat_PCM_EX format_pcm; ConvertToSLSampleFormat(&format_pcm, &sampleInfo_); gFp = fopen("

I want to call 20 times per second the installTapOnBus:bufferSize:format:block:

偶尔善良 提交于 2019-11-29 02:56:42
问题 I want to waveform display in real-time input from the microphone. I have been implemented using the installTapOnBus:bufferSize:format:block:, This function is called three times in one second. I want to set this function to be called 20 times per second. Where can I set? AVAudioSession *audioSession = [AVAudioSession sharedInstance]; NSError* error = nil; if (audioSession.isInputAvailable) [audioSession setCategory:AVAudioSessionCategoryPlayAndRecord error:&error]; if(error){ return; }