audio-recording

Unable to retrieve AudioTrack pointer for write()

ぐ巨炮叔叔 提交于 2019-12-06 03:37:53
问题 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",

android audioRecord- apply gain with variation

谁说胖子不能爱 提交于 2019-12-06 03:17:06
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 playback(hearing like an old walkie-talkie). Is there some formula to vary my gain factor on each

Record Sounds from AudioContext (Web Audio API)

半腔热情 提交于 2019-12-06 02:23:34
问题 Is there a way to record the audio data that's being sent to webkitAudioContext.destination ? The data that the nodes are sending there is being played by the browser, so there should be some way to store that data into a (.wav) file. 回答1: Currently, there's not a native way to do that, but as Max said in the comment above, Recorderjs does essentially this (it doesn't chain onto the destination, but is a ScriptProcessorNode you can connect other nodes to, and have its input recorded. I built

Android record multiple audio at a time?

孤街醉人 提交于 2019-12-05 18:32:06
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..! AFAIK, this is not possible, unless you have multiple Microphones. The Reason behind this answer is, Recording is an synchronized method, so only one instance can use it at a time. 来源: https://stackoverflow.com/questions/9715505/android-record

multiple AVAudioRecorder instances

戏子无情 提交于 2019-12-05 18:30:55
i'm working on an app that records sound. furthermore, i want the user to be able to comment certain situations with his own voice. i thought it would be sufficient to configure one audio session and just create two AVAudioRecorder instances with different file URLs. but that doesn't work, the second audio recorder does create its audio file, but it doesn't record any sound. does anyone know how to realize two AVAudioRecorder instances that actually work on one device? recording with only one AVAudioRecorder works, but using both doesn't work. i have a workaround in mind, but that's a bunch of

audio capture in metro apps

坚强是说给别人听的谎言 提交于 2019-12-05 18:19:59
I need to perform low-level audio capture in my Windows 8 Metro-style app. I guess I need to use the IAudioClient interface, but how to get that interface? Microsoft says "A client obtains a reference to an IAudioClient interface for an audio endpoint device by using one of the techniques described in IMMDevice Interface.." http://msdn.microsoft.com/en-us/library/windows/desktop/dd370865(v=vs.85).aspx but IMMDevice interface is not supported for Metro-style apps. How does one get an IAudioClient interface ? I got an answer from the MSDN forums: Platform::String^ id = Windows::Media::Devices:

Which permission do we need at runtime in android 6.0

落爺英雄遲暮 提交于 2019-12-05 13:52:04
I have an android code which can work well on Android 5.0 version. My AndroidManifest.xml is <uses-permission android:name="android.permission.BLUETOOTH" /> <uses-permission android:name="android.permission.BROADCAST_STICKY" /> <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> <uses-permission android:name="android.permission.RECORD_AUDIO" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/> <uses-permission android:name="android.permission.WAKE_LOCK" /> However, my

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

两盒软妹~` 提交于 2019-12-05 12:13:22
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? kevlar As far as I can tell, there's no way to do this with AVAudioRecorder. You must use Audio Units. Record audio iOS Is there a way to record device audio on the iPhone? Record

Combine two audio blob recordings

半世苍凉 提交于 2019-12-05 11:37:59
I am using recorder.js to record two audio files on my web page, which then creates recordings as blobs. Once I have these audio blobs I would then like to combine them both into one track to be played by another html5 audio player. I've searched the internet but I can't seem to find any documentation on combining two blob files into one. I've found how to concatenate one blob to the other but I'm wanting to merge the files at the beginning. i.e. - sound 1 is singing and sound 2 is guitar. I made a similar attempt using recorder.js and it did not work out for me too. Even after downloading the

IOS Audio Recording, How to Check if Mic / Playback is Busy Before Taking Mic

有些话、适合烂在心里 提交于 2019-12-05 10:40:23
问题 If anything is playing, recording, how to we check to see if the MIC is available (idle) for recording? Currently using AVCaptureDevice *audioCaptureDevice = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeAudio]; AVCaptureSession *captureSession = [[AVCaptureSession alloc] init]; VCaptureDeviceInput *audioInput = [AVCaptureDeviceInput deviceInputWithDevice : audioCaptureDevice error:&error]; AVCaptureAudioDataOutput *audioOutput = [[AVCaptureAudioDataOutput alloc] init];