android-audiorecord

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()")

Unexpected status line: ICY 200 OK for URL openStream() method?

核能气质少年 提交于 2019-12-04 06:35:44
According to changes for kitakt 4.4 there were some problems with playing shoutcast streams (those returning "ICY" instead of "HTTP/1.x" response). So solution for kitkat was to reregister "icy" protocol prefix in JVM once before we opened a stream by this: try { java.net.URL.setURLStreamHandlerFactory( new java.net.URLStreamHandlerFactory(){ public java.net.URLStreamHandler createURLStreamHandler( String protocol ) { Log.d( LOG, "Asking for stream handler for protocol: '" + protocol + "'" ); if ("icy".equals( protocol )) return new com.spoledge.aacdecoder.IcyURLStreamHandler(); return null; }

An extensive project: Streaming audio from microphone to Android device

蓝咒 提交于 2019-12-03 22:16:10
问题 I want to take audio input from a Bluetooth microphone and stream it out loud--like a megaphone or a simple PA system-- and broadcast it in real-time . For this purpose I am using the AudioRecord and AudioTrack classes--since MediaRecorder and MediaPlayer writes and reads to an external file, which I could imagine delays the audio much more than necessary (is this true?). I have discarded the idea of using any Bluetooth classes since the Android API doesn't support the Android device as a

Call recording - make it work on Nexus 5X (rooting or custom ROM possible)

陌路散爱 提交于 2019-12-03 14:28:04
问题 I'm attempting to use AudioRecord with AudioSource.VOICE_DOWNLINK on Nexus 5X, Android 7.1 (my own build from AOSP). I'm already past the permissions stage - moved my APK to privileged apps, made an adjustment to AudioRecord in Android source to stop throwing an exception about this source. Now I'm getting empty recording buffers during a phone call. I know that there are a lot of call recording apps, and they work on other devices. I've also seen certain apps that can perform some hack on a

Android AudioRecord filter range of frequency

浪尽此生 提交于 2019-12-03 14:09:15
问题 I am using android platform, from the following reference question I come to know that using AudioRecord class which returns raw data I can filter range of audio frequency depends upon my need but for that I will need algorithm, can somebody please help me out to find algorithm to filter range b/w 14,400 bph and 16,200 bph. I tried "JTransform" but i don't know can I achieve this with JTransform or not ? Currently I am using "jfftpack" to display visual effects which works very well but i can

AudioRecord with Gain Adjustment not working on Samsung Device

我的未来我决定 提交于 2019-12-03 08:22:40
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 like the combinations i have used to create AudioRecorder . So i used following approach in which i loop

Call recording - make it work on Nexus 5X (rooting or custom ROM possible)

依然范特西╮ 提交于 2019-12-03 04:16:30
I'm attempting to use AudioRecord with AudioSource.VOICE_DOWNLINK on Nexus 5X, Android 7.1 (my own build from AOSP). I'm already past the permissions stage - moved my APK to privileged apps, made an adjustment to AudioRecord in Android source to stop throwing an exception about this source. Now I'm getting empty recording buffers during a phone call. I know that there are a lot of call recording apps, and they work on other devices. I've also seen certain apps that can perform some hack on a rooted N5 and make it work. I wish to achieve the same on Nexus 5X - ANY adjustment is OK for me,

Android AudioRecord filter range of frequency

£可爱£侵袭症+ 提交于 2019-12-03 04:02:02
I am using android platform, from the following reference question I come to know that using AudioRecord class which returns raw data I can filter range of audio frequency depends upon my need but for that I will need algorithm, can somebody please help me out to find algorithm to filter range b/w 14,400 bph and 16,200 bph. I tried "JTransform" but i don't know can I achieve this with JTransform or not ? Currently I am using "jfftpack" to display visual effects which works very well but i can't achieve audio filter using this. Reference here help appreciated Thanks in advance. Following is my

Detect human voice from audio file input

╄→гoц情女王★ 提交于 2019-12-03 02:18:46
问题 I am trying to implement automatic voice recording functionality, similar to the Talking Tom app. I use the following code to read input from the audio recorder and analyse the buffer : float totalAbsValue = 0.0f; short sample = 0; numberOfReadBytes = audioRecorder.read( audioBuffer, 0, bufferSizeInBytes); // Analyze Sound. for( int i=0; i<bufferSizeInBytes; i+=2 ) { sample = (short)( (audioBuffer[i]) | audioBuffer[i + 1] << 8 ); totalAbsValue += Math.abs( sample ) / (numberOfReadBytes/2); }

Is It Possible to Record Audio Through Android Emulator?

不打扰是莪最后的温柔 提交于 2019-12-02 16:11:20
问题 I am Working On a Medical Project and the app can able to record the conversation between doctor and patient and send it for Transcription. Assignment : Basically App is for Recording and Playing the recorded audio. Problem : When ever recording starts, it records 10-20 seconds after that LogCat Shows: 05-07 11:42:52.502: W/MediaProfiles(6321): could not find media config xml file 05-07 11:42:52.522: I/MPEG4Writer(6321): limits: 2147483647/0 bytes/us, bit rate: 12200 bps and the estimated