audiotrack

Calculate FFT from audio file

白昼怎懂夜的黑 提交于 2019-11-28 07:37:34
问题 Before, I asked question about Get frequency wav audio using FFT and Complex class , There, I need to calculate FFT value from AudioRecord input --> from microphone , I somehow managed to get the FFT value... Now I need to calculate FFT value from *.wav audio file that I saved before, I saved the audio in 'raw' folder inside 'res' folder from my project I still using the same FFT Class: http://www.cs.princeton.edu/introcs/97data/FFT.java The complex class to go with it: http://introcs.cs

SoundPool “AudioFlinger could not create track, status: -12”

半腔热情 提交于 2019-11-28 03:11:35
问题 I have an Android app with single button. When the button is clicked, the app starts playing (looping) sound loaded with SoundPool. When the button is clicked again, the sound is stopped, and then started again. But the problem is that the sound is played only every other time. Click 1st time -> sound starts to play Click 2nd time -> sound stops but doesn't start again Click 3rd time -> sound starts to play Click 4th time -> sound stops but doesn't start to play and so on... When the sound

Playing sound over speakers while playing music through headphones

旧时模样 提交于 2019-11-27 23:17:14
I have an AudioTrack streaming via headphones. I have to send a SoundPool to built-in speakers only, without interrupting the AudioTrack playing over the headphones. Any hacks gangsters? Michael Many Android devices use a single output thread in the AudioFlinger / audio HAL for all local playback (earpiece, speaker, wired headset/headphones), making different routing of two tracks simultaneously impossible (which is why on many devices the media streams are forcibly muted if a notification is played and you've got a wired headset attached; because otherwise you'd hear the music in the

How to change audio tempo and pitch individuality using ffmpeg?

喜你入骨 提交于 2019-11-27 15:18:57
I have managed to play audio files using ffmpeg and AudioTrack class in my android project. I can change the speed of audio using AudioTrack class setRate method. But it also change the pitch of audio, I want to change only Tempo of audio but I found no solution on net. anyone can please help me on this as there is no support for this. Solution : I tried SoundTouch library. I compiled it successfully for android but then I failed to use its function because I don't know how to use this library to load audio. But after that I tried library called Sonic . Its basically for Speech as it use PSOLA

AUDIO_OUTPUT_FLAG_FAST denied by client

我的未来我决定 提交于 2019-11-27 13:32:02
I'm getting this AudioTrack warning AUDIO_OUTPUT_FLAG_FAST denied by client in my Android app for a button I'm subclassing. I can hear a click when tapping on the button so is this anything to worry about? Note: I'm not getting the mismatching sample rate message as in this question: AudioTrack: AUDIO_OUTPUT_FLAG_FAST denied by client due to mismatching sample rate Most likely, the tap sound got a AUDIO_OUTPUT_FLAG_FAST in order to use low-latency playback if possible, but the AudioTrack class considered the track settings to be incompatible with the low-latency audio output, so the flag got

How to addTrack in MediaStream in WebRTC

放肆的年华 提交于 2019-11-27 02:09:15
I'm using webrtc to communicate between to peers. I wan't to add new track to old generated stream, as I wan't to give functionality to users to switch their microphones during audio communications. The code I'm using is, Let "pc" be the peerConnection object through which audio communication takes place & "newStream" be the new generated MediaStream got from getUserMedia function with new selected microphone device. var localStreams = pc.getLocalStreams()[0]; localStreams.removeTrack(localStreams.getAudioTracks()[0]); var audioTrack = newStream.getAudioTracks()[0]; localStreams.addTrack

How to convert .pcm file to .wav or .mp3?

北战南征 提交于 2019-11-27 01:40:57
问题 I am currently developing an Android Application that has audio recording and playing. I am new to dealing with audio and I'm having some trouble with encoding and formats. I am able to record and play the audio in my application, but when exporting I am not able to reproduce the audio. The only way I found was exporting my .pcm file and converting using Audacity. This is my code to record the audio is: private Thread recordingThread private AudioRecord mRecorder; private boolean isRecording

How to change audio tempo and pitch individuality using ffmpeg?

你说的曾经没有我的故事 提交于 2019-11-26 17:06:32
问题 I have managed to play audio files using ffmpeg and AudioTrack class in my android project. I can change the speed of audio using AudioTrack class setRate method. But it also change the pitch of audio, I want to change only Tempo of audio but I found no solution on net. anyone can please help me on this as there is no support for this. 回答1: Solution : I tried SoundTouch library. I compiled it successfully for android but then I failed to use its function because I don't know how to use this

AUDIO_OUTPUT_FLAG_FAST denied by client

纵然是瞬间 提交于 2019-11-26 16:23:00
问题 I'm getting this AudioTrack warning AUDIO_OUTPUT_FLAG_FAST denied by client in my Android app for a button I'm subclassing. I can hear a click when tapping on the button so is this anything to worry about? Note: I'm not getting the mismatching sample rate message as in this question: AudioTrack: AUDIO_OUTPUT_FLAG_FAST denied by client due to mismatching sample rate 回答1: Most likely, the tap sound got a AUDIO_OUTPUT_FLAG_FAST in order to use low-latency playback if possible, but the AudioTrack

Android : How to change Playback Rate of music using OpenSL ES

不问归期 提交于 2019-11-26 12:01:53
问题 I am working on a music player in which I need to change tempo (playback speed of music) without changing the pitch. I\'m not able to find any native android class to do so. I tried SoundPool but it doesn\'t work with large music files and it also doesn\'t seems to work on many devices. I also tried AudioTrack but again no luck. Now I am trying android NDK audio example which use OpenSL ES to handle music. Now I just want to add set playback rate feature in this example. Can anyone show me