Questions tagged [audiotrack]

AudioTrack class in standard Android API for playing back raw Audio.

AudioTrack class in standard Android API for playing back raw Audio.

http://developer.android.com/reference/android/media/AudioTrack.html

419 questions
0
votes
1 answer

IllegalStateException in AudioTrack.play()

I am working on an App in which the user can touch the screen and depending on where he/she touches a certain tone is played. To achieve this I have the following code: @Override public boolean onTouchEvent(MotionEvent event) { // Calculate the…
Zero
  • 1,864
  • 3
  • 21
  • 39
0
votes
1 answer

need to understad how AudioRecord and AudioTrack work for raw PCM capture and playback

I use the following code in a Thread to capture raw audio samples from the microphone and play it back through the speaker. public void run(){ short[] lin = new short[SIZE_OF_RECORD_ARRAY]; int num = 0; // am =…
user13267
  • 6,871
  • 28
  • 80
  • 138
0
votes
1 answer

Audio Track for playback in android

Audio track allows streaming PCM audio buffers to the audio hardware for playback. This is achieved by "pushing" the data to the Audio Track object using one of the write(byte[], int, int) and write(short[], int, int) methods. PCM is Pulse code…
0
votes
2 answers

How to change the duration of the audiotrack by an infinite loop?

How to change the duration of the audiotrack by an infinite loop? I understand that I must apply the following line before audioTrack.play(): audioTrack.setLoopPoints (0, generatedSnd.length, -1); For example, I want the duration will be half a…
ephramd
  • 561
  • 2
  • 15
  • 41
0
votes
0 answers

How to increase volume on Android

I'm using AudioTrack to stream audio: track = new AudioTrack( AudioManager.STREAM_VOICE_CALL, SAMPLE_RATE, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_16BIT, 1600*2*2, …
0
votes
1 answer

How many native audiotracks are reserved by the SoundPool object?

If I create a SoundPool object with 20 concurrent streams new SoundPool(20, ...) How many native AudioTrack objects will be reserved by the this SoundPool object ? Is the native implementation of SoundPool Open Source ? Where can I view it ?
Sid Datta
  • 1,110
  • 2
  • 13
  • 29
0
votes
1 answer

Intermittent click when stopping AudioTrack playback

I'm using AudioTrack in streaming mode. About one out of 5-10 times after I stop playback of a short section of a wav file, I hear a clicking noise. It's driving me crazy because I can't consistently reproduce it. I've tried various combinations…
Boris Burtin
  • 811
  • 1
  • 7
  • 18
0
votes
3 answers

Android AudioTrack Error:uninitialized AudioTrack

public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); int minBufferSize = AudioTrack.getMinBufferSize(44100, AudioFormat.CHANNEL_CONFIGURATION_MONO, …
jason white
  • 687
  • 4
  • 11
  • 28
0
votes
1 answer

Unable to Play Sound correctly Using Android AudioTrack

I am running this program which uses AudioTrack to play a sound file from the resource folder. There' output but the sound is incorrect. The Project file is uploaded. http://www.mediafire.com/?995mxc87hf28fxk package com.self.AudioTrack; …
jason white
  • 687
  • 4
  • 11
  • 28
0
votes
1 answer

Unable to play(using AudioTrack) Captured PCM audio using Visualizer

I m trying to capture the played file in MediaPlayer using Visualizer and play it using AudioTrack. But the captured data is noise only. Here is my code. mPlayer = MediaPlayer.create(this, R.raw.call_ringtone); …
Bhupinder
  • 1,329
  • 1
  • 14
  • 29
0
votes
2 answers

Android mixing raw sounds. Source is java arrays not files or recourses

I have audio data in uncompressed raw format as java arrays. short[] or byte[] I wish to play them in Android. SoundPool looks like what I need but I can't find way to load data from memory. It loads from files only and I am not sure how do I…
Max
  • 6,286
  • 5
  • 44
  • 86
0
votes
1 answer

How to remove background Noise in Audio Track?

I am developing VOIP kind of application. Sending the voice is perfect but when i receive the same voice from the webserver, i am playing back that using AudioTrack API. I am calling at.play() and at.write in a Thread so that i should get all the…
G M Ramesh
  • 3,420
  • 9
  • 37
  • 53
0
votes
1 answer

Android: Delay an AudioTrack

I have an Android AudioTrack such as: private AudioTrack mAudioTrack; int min = AudioTrack.getMinBufferSize(sampleRate, AudioFormat.CHANNEL_OUT_STEREO, AudioFormat.ENCODING_PCM_16BIT); mAudioTrack = new AudioTrack(AudioManager.STREAM_MUSIC,…
gregoiregentil
  • 1,793
  • 1
  • 26
  • 56
0
votes
1 answer

Creating a video playlist with separate audio tracks on the fly, is this possible today?

I've been researching all over the web but haven't found any conclusive answer to this so thought I'd ask the stackoverflow community. I have an HTML(5) page which is supposed to get the following functionality: Video "timeline" (no editing, but…
Jannis
  • 17,025
  • 18
  • 62
  • 75
0
votes
1 answer

Android AudioTrack class for playing piano sounds

im trying to implement a piano app, where user can play on a virtual piano shown on the display. Because of low latency im trying to use the AudioTrack Class, which makes a lot of trouble. My Problem is to play the sounds fast. At the moment I use…
pawlinsky
  • 420
  • 1
  • 6
  • 18
1 2 3
27
28