Android :: Synchronizing AudioTrack And AudioRecord
Jan 21, 2010
My application uses AudioTrack in streaming mode and AudioRecord simultaneously.My problem is that I start them at the same time, but I have no guarantee that they will actually start playback ecording in the same timestamp. The reason I need this kind of accuracy is because I use echo cancellation (subtracting audio played to speaker from the recording).My echo canceller doesn't require an exact delay, but the delay introduced between AudioTrack and AudioRecord moves in the range of 250ms (between different runs), and that's too much - each run is different because they start themselves asynchronously. The API doesn't provide me a way to make sure they start in the same time, so I thought about measuring this starting delay somehow and then using it in my calculation.Does anyone have an idea how to do that, utilizing their API or in any other way?
View 2 Replies
Apr 30, 2009
I want to use AudioRecord and AudioTrack classes(in SDK 1.5) in my program. Where can I find how to use it. Is there any API demo program for this?. If not it is greatly appreciated if someone can post a sample code in this forum.
View 7 Replies
View Related
Feb 3, 2010
I currently use the AudioTrack and AudioRecord classes in Android.I use the pure PCM data but I was wondering what my options are for other codecs?From this page it seems I can only encode and decode using AMR narrowband?The code runs properly but I'm wondering does it actually encode the Audio as AMR_NB and if this is not a proper way to do it?I was getting a buffer overflow when using raw PCM but none have appeared since using the new code with the MediaRecorder.AudioEncoder.AMR_NB used instead of the AudioFormat.PCM
View 2 Replies
View Related
Dec 25, 2009
I need to stop the AudioTrack, regardless what's in the buffer, immediately when executing the stop/release. The AudioTrack plays in the STREAM mode. It appears that the AudioTrack finishes playing what's in the buffer and than stops. It seems that it's such a fundamental flaw since there are so many audio applications out there.
View 4 Replies
View Related
Jul 23, 2010
I have a new Moto Droid X. I also have an iPod touch that I used for music and whatnot, but I am selling it. I hate to say it, but iTunes + iPod = easy synchronization. I've never been a huge fan of Windows Media Player and I'm not overly impressed with its ability to sync up with the Droid. It gets the job done but it's more cumbersome. Does anybody know of anything better?
View 4 Replies
View Related
Sep 9, 2010
What is the best way to synchronize android SQlite database with MSSql/MySQL database at the back end (over HTTP)?
View 1 Replies
View Related
Mar 16, 2012
I am looking for an offline synchronizing tool/app/client for android devices.It can be used to take backup of
1. Contacts
2.Messages
3.Photos & Videos
4.Calender.
It should be able to backup this data using one or more of these:
1.USB
2.WIFI
3.BLUETOOTH
4.HTTP
Also, I am looking for such a tool specifically for Linux machines.The reason for this is to avoid sending data to the cloud during backup for privacy reasons. Actually I am developing such a cross platform compatible offline synchronizing tool myself. But I want to know if this already exists.
View 5 Replies
View Related
Aug 17, 2012
I recently bought my first smart phone (Sony Xperia Active Android 2.3)
Since yesterday my time does not synchronize after a reboot. I rebooted a couple of times and also tried a different Apps which query and sync my clock. But they all come up with the same problem "server timeout", "perhaps there are network problems" "network not available" and I'm sure i have wifi working at the time. I also tried different NTP servers, IP adresses instead of DNS names and i've checked my home router (problem occurs at work as well).
View 9 Replies
View Related
Mar 29, 2013
For working needs a colleague is given the password for a gmail account and he settled this account on his android phone. Now I want to stop the possibility for him to accede and so I've changed the password via web. But I noticed on my android that gmail keeps synchronizing every mail, despite I've changed th pw! Obviously also my colleague is able to receive all emails yet.
View 1 Replies
View Related
May 15, 2009
I'm trying to figure out how to use the AudioRecord class.I created a callback with a logging message, but don't ever see it called.Do you see anything wrong with what I'm doing? Do you have an example of how to use the API?
View 6 Replies
View Related
Apr 23, 2009
I'm currently initiating the AudioTrack() for MODE_STREAM. I load some bytes using the write() and I see that it is working but once hit the play() call nothing happens. what is the matter? should I do something else that is not obvious? Any tips Google friends? My settings: streamType - STREAM_MUSIC sampleRateInHz - 44100 channel Config - CHANNEL _CONFIGURATION_STEREO audioFormat - ENCODING_PCM_16BIT bufferSizeInBytes - 256K the total size (in bytes) of the buffer where audio data is read from for playback. mode - MODE_STREAM.
View 21 Replies
View Related
Oct 18, 2010
Ive noticed an opaque "syncing" icon appear in the top corner of my screen and ive managed to drag it down and notice it say "synchronizing contacts.I dont want this to happen. I havnt added any contacts. Im fine with my contacts the way they are. I unchecked the "background data" box under "accounts and sync" but i need it checked to use the market so i caved and let it do it.How do i get it to stop this? If it helps, ive only noticed it in the last couple days, and the only apps ive downloaded have been tweetdeck and angry birds. Could one of those be doing it?
View 4 Replies
View Related
Mar 10, 2010
I currently have a Loop back program for testing Audio on Android devices.It uses AudioRecord and AudioTrack to record PCM audio from the Mic and play PCM audio out the earpiece. So as you can see in the creation of the AudioTrack and AudioRecord the Encoding is supplied via the AudioFormat but this only allows 16 bit or 8 bit PCM.I have my own G711 Codec implementation now and I want to be able to encode the audio from the Mic and decode it going into the EarPiece, So I have encode(short lin[], int offset, byte enc[], int frames) and decode(byte enc[], short lin[], int frames) methods but I'm unsure as to how to use them to encode and the decode the audio from the AudioRecord and AudioTrack.
View 2 Replies
View Related
Nov 11, 2010
I used AudioRecord on emulator and phone. I found that AudioRecord is not working on phone: 1> the min-buffer-size on simulator is much smaller than phone 2> The audio data I read from phone is all zero.
View 2 Replies
View Related
Mar 25, 2010
I'm doing a voice recording using AudioRecord class and the main requirement that the frequency must be 16000 Hz. I'm using only emulator in development process for now and met the problem that I can't set frequency more than 8000, otherwise I get bufferSize -2, and can't create instance of AudioRecord with such buffer. Thank you to Szabolcs Vrbos, he told me that this problem is only with emulator and several Samsung phones, device can record with higher frequency.I need a word from Android engineers that I will be able to record voice with 16000 Hz frequency on for instance HTC Hero (Android 1.5)or similar device with os 1.5 or higher.
View 2 Replies
View Related
Apr 1, 2010
the location where the audioflinger, surfaceflinger and cameraservice talk to MediaRecorder's APIs? Is there any relation between MediaRecorder and AudioRecord?
View 6 Replies
View Related
Sep 25, 2010
We have been getting reports of audio recording not working on Samsung Moment phones on 2.1-update1.
int bufferSize = AudioRecord.getMinBufferSize(sampleRate, AudioFormat.CHANNEL_IN_MONO, AudioFormat.ENCODING_PCM_16BIT); this.audioRecord = new AudioRecord(MediaRecorder.AudioSource.MIC, sampleRate, AudioFormat.CHANNEL_IN_MONO, AudioFormat.ENCODING_PCM_16BIT, bufferSize);
generates these logs: I/AudioPolicyManager( 1889): getInput() inputSource 1, samplingRate 16000, format 1, channels 10, acoustics 0 W/AudioHardwareALSA( 1889): openInputStream : mInput already exists!! E/AudioRecord( 2618): Could not get audio input for record source 1 E/AudioRecord-JNI( 2618): Error creating AudioRecord instance: initialization check failed. E/AudioRecord-Java( 2618): [ android.media.AudioRecord ] Error code -20 when initializing native AudioRecord object. I can't find the "mInput already exists". anywhere in the source base, could this perhaps be an error message included by the OEM?
View 4 Replies
View Related
Feb 15, 2010
I want to play music from online mp3 link.I am reading the music data into a stream and trying to play it using audio track. But itz giving only noise.No music i could listen.Same buffer I can play in Media Player,But i could not play in audio track.
View 16 Replies
View Related
Dec 15, 2009
I am getting this clicking sound when playing static pcm data. Anybody out there is having the same problem? This is not the data issue.
View 7 Replies
View Related
Apr 13, 2010
I'm in the process of wring a music player that can play SID tracks (music from the Commodore 64), and everything is progressing nicely, except that I sometimes get audio stuttering.The stuttering only happens when the player is in the background, and another application has focus. It's most noticeable when a cpu heavy app(like Google Earth) is running in the foreground.I have tried adjusting the priority of my thread and increasing the AudioTrack buffer size, but nothing has solved the stuttering problem.I believe the problem is that generating the audio takes quite a lot of cycles (I'm at 15-30% cpu load), and that my audio thread is being starved and cant keep up with AudioTrack's constant need for data.I'm must be doing something wrong, I can't imagine that gui threads should be able to starve a high priority audio thread.I hope someone have some ideas on how to get my player stutter free, as I'm at a loss :)
View 9 Replies
View Related
Jun 27, 2009
If I create and release multiple AudioTrack objects, the GREF count continually increases which eventually causes an application crash. Even with a forced garbage collection, I end up with the same high GREF count at the end of the loop.In my application, I continuously create AudioTracks from variable lenght buffers.I guess I can try and use a fixed size pool of AudioTracks each with a buffer large enough to fit my longest sound, and try and reuse them.Is there a better/correct way to completely clear resources used by an AudioTrack?
View 5 Replies
View Related
Aug 10, 2009
There is a AudioTrack Class in SDK 1.5 which can play PCM buffer directly.But it is not exist in SDK 1.1. I want to play PCM buffer in SDK1.1,but i don't know how.
View 2 Replies
View Related
Oct 2, 2009
I am trying to determine if I should go the ndk way to work on a music synth app, but first wanted to do a sanity check in the java layer by testing how many sine tones i could play concurrently, and so I tried this. And it's pretty low: I can only play about 4 or 5 tones before the obtainBuffer timeouts start increasing in number. Also, changing the media volume while the tones are playing disrupts the output.
View 3 Replies
View Related
Jan 21, 2010
I am trying to resolve the clicking problem while using the AudioTrack. It takes place only when playing the first part of the wave (pcm) buffer when the offset to the write is 0 (zero). track.write(buffer, offset, minBufferSize); It tells me that there is something wrong with the pcm data. Could it be because the wave data, I generate using Audacity, has some header as opposed to the pure pcm which does not? I was looking for the converter tools to generate pure pcm but found none. Applications I found generate only wave data so I am not able to test this assumption. At this point I am sure that filling the buffer is correct. Any ideas?
View 2 Replies
View Related
Jan 25, 2010
I'm currently writing an app that uses a Service. A thread in the service generates an infinite stream of audio, and writes it to the AudioTrack. I want the audio to keep playing indefinitely until the user stops it. Based on my understanding of the PowerManager class, it looks like I should need a PARTIAL_WAKE_LOCK to keep the CPU awake so the audio can continue playing.
However, I left the audio playing on my phone with no wake lock, running on battery, in airplane mode, with all five items on the power control widget disabled, and the audio just kept right on playing for at least 15 minutes. Afterwards, I looked at the battery history, and it showed "Running (100%)", even though the Partial wake usage was negligible. Is there something special about AudioTrack which prevents the CPU from entering its deep sleep state? Should it be necessary for my service to grab a PARTIAL_WAKE_LOCK and its associated permission?
View 2 Replies
View Related
Dec 16, 2009
It doesn't seems as if the the stop and release immediately terminates the audio played by the MODE_STREAM track. It looks like it finishes playing the rest of the buffer and then stops.
View 3 Replies
View Related
Jun 26, 2010
Aria is my first Android phone , I set up my gmail account and want to avoid synchronizing the gmail contacts , The reason is that there are many contacts and it clutters the people search functions.For now I deleted my gmail contacts , did a resynch.need to know
1) Is it possible to control the sync with gmail for just emails and not calendar and contacts
2) if not any way to filter the list from the people's search.
View 6 Replies
View Related
Jul 28, 2012
I want to know if there any way of synchronizing contacts with google maps. Is there any chance of opening google maps and see all the houses of my friends? To many contacts I added their adresses so what I want is to open the GMaps and select a destination easier.
View 3 Replies
View Related
Oct 17, 2013
I recently bought an HTC wildfire and then rooted it via unrevoked. then I got cyanogen mod 7 and changed the rom to gingerbread from stock froyo. everything is working fine except my Google account doesn't sync with the phone. wats app and Facebook are working ok.
View 3 Replies
View Related
Apr 6, 2010
How can I get the amplitude/volume when recording with AudioRecord?
View 2 Replies
View Related