audio-recording

Method captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection only called a few times

大兔子大兔子 提交于 2019-12-08 02:39:31
问题 I'm capturing audio from external bluetooth microphone. But I can't record anything. This method is only called one time, at the beginning of the current AvCaptureSession. - (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection After that I never get called this method for process the audio. For instantiate the capture session I do this: self.captureSession.usesApplicationAudioSession = true;

How to change audio recording settings to 16Khz and 16 bit when we record audio?

十年热恋 提交于 2019-12-08 01:56:55
问题 I have the settings shown below. I want change audio recording settings to 16Khz and 16 bit when we record audio. NSArray *dirPaths; NSString *docsDir; dirPaths = NSSearchPathForDirectoriesInDomains( NSDocumentDirectory, NSUserDomainMask, YES); docsDir = [dirPaths objectAtIndex:0]; NSString *soundFilePath = [docsDir stringByAppendingPathComponent:@"sound.wav"]; NSURL *soundFileURL = [NSURL fileURLWithPath:soundFilePath]; NSDictionary *recordSettings = [NSDictionary

Incoming voice not getting recorded in Samsung S7, S8 and Gionee A1

我们两清 提交于 2019-12-08 00:35:17
问题 I am using this link to record voice when there is any incoming call. Link Url this approach works fine with all device except when i run this code on Samsung S7 , S8 and Gionee A1 The voice of the other side is not getting recorded. 回答1: Please use this code below to achieve this it works well on all devices. import java.io.File; import java.io.IOException; import java.lang.Exception; import java.util.Date; import java.text.SimpleDateFormat; import android.os.IBinder; import android.app

MediaRecorder throw “java.lang.RuntimeException: start failed: -2147483648” when trying to record audio on LG G Watch

天涯浪子 提交于 2019-12-07 22:10:35
问题 I am trying to record audio in my app on a LG G Watch. The following code throws RuntimeException with message "start failed: -2147483648" at the statement "recorder.start();". Wondering what I'm doing wrong here. I have tried a lot of different set of parameters, for example for AudioSource: recorder.setAudioSource(MediaRecorder.AudioSource.DEFAULT); //-and- recorder.setAudioSource(MediaRecorder.AudioSource.MIC); Also for OutputFormat I have tried recorder.setOutputFormat(MediaRecorder

iOS: Record audio in other format than caf

十年热恋 提交于 2019-12-07 20:45:06
问题 I am working on audio recording. I am able to record my audio in caf (Core audio format). Now I want to record sound in .mp3 or .amr . I tried a lot of google but didn't found anything. I am not sure if my steps following work: Write that Audio with .caf extention to document dir Read data from that file write the file again with .mp3 or .amr extention I have 100% doubt that this will not going to work as this will just re save file with some other extension. This won't change audio codec. I

iPhone Allow Other App to Play Audio While Recording Audio / Shazam

白昼怎懂夜的黑 提交于 2019-12-07 16:57:43
问题 Looking to do pretty much what Shazam is doing as far as recording audio while another app is playing audio. 1) Recording audio fine, no problem here 2) When app starts and starts recording, the music from another app stops (itunes, etc). 3) I have played with all of the incantations of the AV Audio settings with no luck in having the audio continue / resume. 4) When Shazam starts, the audio stop for a bit, and then resumes. I assume that Shazam is doing something to restart the audio with

android audioRecord- apply gain with variation

僤鯓⒐⒋嵵緔 提交于 2019-12-07 16:42:58
问题 I want to apply gain to my recordings(PCM 16bit). For this I have the following code: for (int i=0; i<buffer.length/2; i++) { // 16bit sample size short curSample = getShort(buffer[i*2], buffer[i*2+1]); if(rGain != 1){ //apply gain curSample *= rGain; //convert back from short sample that was "gained" to byte data byte[] a = getByteFromShort(curSample); buffer[i*2] = a[0]; buffer[i*2 + 1] = a[1]; } If applied like this(multiplying each sample with the fraction number), I get discontinues when

Android record multiple audio at a time?

北城余情 提交于 2019-12-07 15:48:24
问题 I need to record more than one audio at a time. I have two record buttons if I clicked the first record button audio recording will be started. Before stop that audio recording If I am clicking the second record button I need to record the another one audio separately. Is there possibility to record more than one audio at a time ? Thanks in advance..! 回答1: AFAIK, this is not possible, unless you have multiple Microphones. The Reason behind this answer is, Recording is an synchronized method,

Why is Codename One on iOS recording audio as CAF?

耗尽温柔 提交于 2019-12-07 15:07:19
My question is related to this other SO question . I am trying to record audio in iOS via Capture.captureAudio() . It outputs an audio file that can be read on the computer but neither on iOS (iPhone 4S) nor on Android. ffmpeg -i yields : Input #0, caf, from 'myFile.m4a': Duration: 00:00:07.04, start: 0.000000, bitrate: 37 kb/s Stream #0:0: Audio: aac (aac / 0x20636161), 16000 Hz, mono, s16, 23 kb/s If I record a file with iOS via Voice Recorder app I get from ffmpeg : Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Test.m4a': Metadata: major_brand : M4A minor_version : 0 compatible_brands: M4A

Can AVAudioRecorder be used to record audio coming from your iOS app?

好久不见. 提交于 2019-12-07 10:06:00
问题 I'd like to record the audio coming from my iPhone app. So after the background music and sound effects are mixed I'd like to sample the audio before it's played from the device's speakers (or headphones). I've been experimenting with RemoteIO Audio Units. These seem promising. However they're pretty low level. Can AVAudioRecorder (or other "high-level" object) be used to capture audio coming from an iOS device? 回答1: As far as I can tell, there's no way to do this with AVAudioRecorder. You