audio-recording

AVAudioSession / Audio Session Services switching output

假装没事ソ 提交于 2019-12-04 18:42:19
问题 Okay, I have my AVAudioSession defined with the following (yes, mix of the c and obj-c calls) Also note that the app has background mode audio, because if recording it must continue to do so while the app is in the background: [(AVAudioSession *)[AVAudioSession sharedInstance] setDelegate: self]; // Allow the app sound to continue to play when the screen is locked. [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord error:nil]; //Turn off automatic gain on the

Audio recorded from microphone is muted during the voice call

落花浮王杯 提交于 2019-12-04 16:55:21
I am trying to build application which records audio from the microphone for the later processing. Everything works fairly well, except the following problem: During the voice call (in and out) the recorded file gets no audio data, it contains just NULLs. I am using AudioRecorder and MediaRecorder, both have the same problem. The question is if this is normal API behavior or I am missing something? Here some additional info: Permissions: <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.RECORD_AUDIO" /> SDK:

How to save microphone audio input?

僤鯓⒐⒋嵵緔 提交于 2019-12-04 14:46:23
I need to save microphone input to use later in an AudioElement. I do this to get microphone input: window.navigator.getUserMedia(audio: true).then((MediaStream stream) { # what should go here? }); What should I do to save the audio? There are many horrible stupid examples out there where you are able to play the current audio recording in the current browser window. Is there ever a use case for this. For video I can imaging that one want to build a Skype like application and have a preview window to see if you look stupid on the video, but audio ... I found one good post though: From

How to record audio from Audio Element using javascript

梦想的初衷 提交于 2019-12-04 14:13:06
I am making an audio recorder using HTML5 and Javascript and do not want to include any third party API, I reached at my first step by creating an audio retriever and player using <audio> tag and navigator.webkitGetUserMedia Function which get audio from my microphone and play in through <audio> element but I am not able to get the audio data in an array at this point I don't know what to do which function to use. simple just create a audio node, below is tweaked code from MattDiamond's RecorderJS: function RecordAudio(stream, cfg){ var config = cfg || {}; var bufferLen = config.bufferLen ||

AudioRecord with Gain Adjustment not working on Samsung Device

家住魔仙堡 提交于 2019-12-04 13:12:46
问题 I have written code for recording audio file using AudioRecord and while writing file on SD card i am making two version. Version 1 Recorded file is saved on SD Card as it is. Version 2 I am applying Gain feature on recorded file and saving on SD card. This works awesome on Sony Ericson mobiles.Also audio volume is boost to great extent. But i am struggling to make it work on Samsung Devices. when i play recorded file it sound like Talking Tom :P Initially i thought Samusung device did not

record voice for a specific time period in android

谁说胖子不能爱 提交于 2019-12-04 13:01:32
I have two buttons, one for start recording and another for stop recording. i got success in recording sound and storing in sdcard: now what i want is if i press stop button before 15 sec i should remain as it is, but if recording time going more then 15 sec it should automatically stop recording and store recorded file in sd card: my code for recording sound is here : ** public void startRecording(View view) throws IOException { startButton.setEnabled(false); stopButton.setEnabled(true); File sampleDir = Environment.getExternalStorageDirectory(); try { //audiofile = File.createTempFile("sound

How to sample multi-channel sound input in Java

馋奶兔 提交于 2019-12-04 11:50:58
问题 I realised this might be relatively niche, but maybe that's why this is good to ask anyway. I'm looking at a hardware multiple input recording console (such as the Alesis IO 26) to take in an Adat lightpipe 8 channel input to do signal processing. As I have yet to acquire the device and need to work out whether this is feasible (budgetary concerns), I'd like to ask if anyone has any experience tapping all these 8 inputs for data in Java? I've seen tons of examples of recording sound using the

Audio input through headphone jack in Android?

烂漫一生 提交于 2019-12-04 10:55:40
问题 I am trying to get audio input through the headphone jack for my final year project. It would be a great help if someone can share some code on how to capture the data. I have been trying but as I am fairly new to android, I couldn't find any API for headphone jack in MediaRecorder.AudioSource... There are only these sources available: http://developer.android.com/reference/android/media/MediaRecorder.AudioSource.html 回答1: If you choose e.g. DEFAULT or MIC from MediaRecorder.AudioSource as

Recording mp3 on iPhone by SDK

烈酒焚心 提交于 2019-12-04 08:37:37
I'm wondering if it's possible to record an audio file in mp3 format programmatically with Xcode. I've read a tons of documentations and I've googled for this, but no result. Please help, if someone knows how this is possible? KakoSquid I would start here http://developer.apple.com/library/ios/#referencelibrary/GettingStarted/GS_AudioVideo_iPhone/_index.html , try to record some raw sound file and then convert it to mp3 with some 3rd party library like LAME. You can pick up LAME source here: http://lame.sourceforge.net/ Try building a static library for iOS / armv6, I actually managed to build

Unable to retrieve AudioTrack pointer for write()

久未见 提交于 2019-12-04 07:32:04
I am trying to implement AudioTrack to retrieve audio in my android device for incoming call from IAX but facing exception after some while . private void writeBuff(short[] buf) { try { if (this.track == null) { Log.w("IAX2Audio", "write() without an AudioTrack"); return; } int written = 0; while (written < buf.length) { if (this.track != null) { int res; res = this.track.write(buf, written, buf.length - written); switch (res) { case AudioTrack.ERROR_INVALID_OPERATION: Log.e("IAX2Audio", "Invalid write()"); return; case AudioTrack.ERROR_BAD_VALUE: Log.e("IAX2Audio", "Bad arguments to write()")