[android-developers] Audio Comparison

2016-12-17 Thread Bassem Waheed
Hi :) I hope you are doing great!! 

I want to record the user's voice while he says a word and compare it with 
a recording of him saying the same word! 
Just like "Ok Google!" 

So, Is there a library that can provide that audio comparison thing!

Thank you ;)

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/21738fe7-f2f9-4c7d-b2f4-0e7ca8b5a4e3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Audio of YouTube Video won’t Stop on Screen Change

2016-03-29 Thread Cayce
 

Our Android app has three HTML constructed screens, with a YouTube embedded 
video in each one. When one of those screens is active with the video 
playing, the audio of the video continues playing after the user has exited 
the screen. I’ve read that this could be a cache issue, which could make 
sense, in which I’d be interested in knowing how to control that. 


If there’s a way to force quit a video on screen change, I’d appreciate 
hearing about that as well.


Thanks.


Cayce

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/edf0832f-929b-41f2-9147-2485b13e2c70%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Audio recording problem - fake sample rate

2015-12-23 Thread Robert Scott
There is an audio recording problem with some devices, even newer ones.  
The native audio recording sample rate appears to be a puny 8000 Hz, which 
means it can only render frequencies up to 4000 Hz.  This is a problem for 
my piano tuning app which must detect frequencies above 4000 Hz. to tune 
the top few notes.

So far I have only gotten reports of this problem on certain models of the 
LG G3 and the Nexus 7 (Asus).  The worst part is these devices do not 
return an error when we try to set up an audio input stream and request a 
sample rate of 22050 Hz.  Instead they take their 8000 samples per second 
and up-sample by duplicating each sample 2 or 3 times to give us audio that 
appears to be sampled at 22050 samples per second as requested, but it 
still cannot faithfully render frequencies above 4000 Hz, so our piano 
tuning app gives very strange results for the top few notes on the piano.

Does anyone here work with audio input apps and can you confirm this 
problem on any other devices?  You can test it out by sideloading our app 
from

  www.tunelab-world.com/atl.html

It will run in free-trial mode well enough to test this out.  To test for 
the sampling rate problem, tap on the large "A4" and select the note "B7" 
by tapping on the "7" first.  Then on a different device or computer, 
generate a tone at 3950 Hz.  One such on-line source is 

  onlinetonegenerator.com/

If this tone produces just one peak in the spectrum display at 3950 Hz, 
then everything is fine.  But if this produces two peaks - one at 3950 and 
the other at 4050, then you have a device that is sampling at 8000 Hz and 
then up-sampling to feed our app a fake 22050 samples per second.

-Robert Scott
 Hopkins, MN

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/5ab48a86-f5a9-4996-93e8-f7abb7855104%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Audio recording problem - fake sample rate

2015-12-23 Thread Massimo Messore
I've been working with android audio recording for a while.

As far as I know the only guaranteed supported recording sample rate is
44100Hz which means up to 22KHz of bandwidth.

This should be a "real" sampling rate, no upsampling on most devices.

Did you try to set AudioRecord with 44.100Hz as sampling rate?

Regards.
Il 23/dic/2015 17:20, "Robert Scott"  ha scritto:

> There is an audio recording problem with some devices, even newer ones.
> The native audio recording sample rate appears to be a puny 8000 Hz, which
> means it can only render frequencies up to 4000 Hz.  This is a problem for
> my piano tuning app which must detect frequencies above 4000 Hz. to tune
> the top few notes.
>
> So far I have only gotten reports of this problem on certain models of the
> LG G3 and the Nexus 7 (Asus).  The worst part is these devices do not
> return an error when we try to set up an audio input stream and request a
> sample rate of 22050 Hz.  Instead they take their 8000 samples per second
> and up-sample by duplicating each sample 2 or 3 times to give us audio that
> appears to be sampled at 22050 samples per second as requested, but it
> still cannot faithfully render frequencies above 4000 Hz, so our piano
> tuning app gives very strange results for the top few notes on the piano.
>
> Does anyone here work with audio input apps and can you confirm this
> problem on any other devices?  You can test it out by sideloading our app
> from
>
>   www.tunelab-world.com/atl.html
>
> It will run in free-trial mode well enough to test this out.  To test for
> the sampling rate problem, tap on the large "A4" and select the note "B7"
> by tapping on the "7" first.  Then on a different device or computer,
> generate a tone at 3950 Hz.  One such on-line source is
>
>   onlinetonegenerator.com/
>
> If this tone produces just one peak in the spectrum display at 3950 Hz,
> then everything is fine.  But if this produces two peaks - one at 3950 and
> the other at 4050, then you have a device that is sampling at 8000 Hz and
> then up-sampling to feed our app a fake 22050 samples per second.
>
> -Robert Scott
>  Hopkins, MN
>
> --
> You received this message because you are subscribed to the Google Groups
> "Android Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to android-developers@googlegroups.com.
> Visit this group at https://groups.google.com/group/android-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-developers/5ab48a86-f5a9-4996-93e8-f7abb7855104%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/CAMUXMhtFz6LvOcBQBa%3Dgz_BYUxnm5oNakFNc1T9mfOfhFaAirw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Audio stops after 2,5 minute

2015-07-10 Thread Tellblom
Hi,,

I'm writing a application that send a signal to another device thru the 
earplug.
I.e. the application plays a mp3( 1 sec long ) file to the other device and 
this work very good with some simple commands.

But when I try to send the command every 10 sec for 10 minutes it stops 
after 2:40 minutes (the command play at 2:40 works but after that no signal)
I can log that it SHOULD play the sound but it does not.

Its quite a simple code (mPlayer is declared in top of the code as: 

private MediaPlayer mPlayer

This code is called every 10 sec and it works for the first 24 times but 
then it just writes in the debuglog, but sends no sound.

private void sendCommand() {

Log.*d*(CMD!, Playing sound for command Activate);
mPlayer = MediaPlayer.create(this, R.raw.cmd_activate); }
mPlayer.setVolume(1, 1);  //Sets the volume on both channels
mPlayer.start();

}


What have i missed, why does it stop making the sound to the earplug?


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Audio composer development

2013-09-23 Thread Dilip Kumar Chaudhary
I'm developing App in which I have to record audio,add tone with the
recorded voice then save it in the sdcard so produced audio will have
recorded voice with some customised tone.I have google it lot but didn't
find any proper solution.Can any suggest me how to do this.Please suggest
me I will really appreciate your valuable suggestion.
-- 
*Thanks  Regards*
Dilip Kumar Chaudhary
My Linkedin Profilehttp://in.linkedin.com/pub/dilip-kumar-chaudhary/44/64/55b
My Development Blog http://dilipdevelopment.blogspot.com/

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[android-developers] Audio Effects in android

2013-08-09 Thread Yamusani Vinay
Hi,

   Actually i'm developing a application where i need to apply audio 
effects like bassboost so i tried with MediaPlayer in android sdk and i 
created BassBoost object and i added all the properties to bassboost but 
still there is no effect..so i shifted to native audio player and i created 
a native audio player (android ndk) and i used bassboost interface 
available in opensl es and i added all the properties to it but still there 
is no effect..i tried both the ways but there is no result..and another 
main thing i need to say is  The methods, parameter types and units exposed 
by the BassBoost implementation are directly mapping those defined by the 
OpenSL ES 1.0.1 Specification (http://www.khronos.org/opensles/) for the 
SLBassBoostItf interface. (written in developer.android.com)..then i 
searched for the bassboost posted in many sites but there is no reply..If 
there is no effect then what is the use of bassboost class in sdk..if i'm 
wrong in setting the properties or if i'm missing something..so please 
suggest me.. 

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[android-developers] Audio record through mobile browser

2013-07-10 Thread news.anand11
Hi, I have tried HTML5 Audio API to record audio, but unfortunately its not
supporting to Mobile Browser. I want to know that is there any way to
implement recording audio through mobile browser ? I am not sure WebRTC can
do this. What is the best way to do that ? I want to make app like
vine(android), which will record the audio from user's mobile and upload it
to server. The same think user can do from PC browser as well. Is there any
generic solution ?


Thanks,
Anand Soni.

-- 
-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Audio Programming in android using OPENSL ES

2013-05-27 Thread Yamusani Vinay
Actually i'm trying to implement a music player app in android..so i 
installed android ndk which contains opensl audio libraries..i used it and 
tried to apply environmental reverb effect..but there is no change in the 
song..so anyone pls let me know what is the problem..

note:
Added permissions in manifest file. 

-- 
-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Audio device capabilities

2013-04-29 Thread Bjoern D. Rasmussen
Hi, I'm not sure this is the right forum for OpenSL questions, but I'll try.

In the Java SDK for Android there's the method 
called android.media.AudioRecord.getMinBufferSize(...) for querying audio 
input device capabilities.

I can't find a similar one in the NDK using the OpenSL API. OpenSL has an 
interface called SL_IID_AUDIOIODEVICECAPABILITIES but if I query this 
interface in the NDK I get an error that the interface is not supported.

Anyone know how to get information about audio devices in Android using 
NDK? E.g. what API does android.media.AudioRecord.getMinBufferSize(...) 
call?

-- Bjørn

-- 
-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Audio streaming application

2012-12-22 Thread Talha Qamar
no right now it does not support it.

On Sat, Dec 22, 2012 at 12:03 PM, Asheesh Arya asheesharya...@gmail.comwrote:

 Please find the enclosed attachment containg source code to play live
 audio streaming from server

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Audio streaming application

2012-12-22 Thread Asheesh Arya
What? Can You Elaborate?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Audio streaming application

2012-12-22 Thread Ali
Thanks Ashish

On Saturday, December 22, 2012 10:03:58 AM UTC+3, asheesh arya wrote:

 Please find the enclosed attachment containg source code to play live 
 audio streaming from server


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Audio streaming application

2012-12-21 Thread Ali
Hi All,

We are looking to develop an Audio streaming application where we have the 
media files on a web server and have users browse them and play them on 
android phones. What is the best approach to develop this. Would be 
helpfule if you can share your experiences and best practices.

Thanks for your time.

Cheers,
Ali

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Audio streaming application

2012-12-21 Thread Talha Qamar
Hi i have sent u the simple code needed for audio streaming.Check it.Its
working.
HaPpY CoDiNg :)
Regards,
Talha Qamar.

On Sat, Dec 22, 2012 at 11:05 AM, Ali aliwor...@gmail.com wrote:

 Hi All,

 We are looking to develop an Audio streaming application where we have the
 media files on a web server and have users browse them and play them on
 android phones. What is the best approach to develop this. Would be
 helpfule if you can share your experiences and best practices.

 Thanks for your time.

 Cheers,
 Ali

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=enpublic class StreamaudioActivity extends Activity implements OnClickListener,
OnPreparedListener, OnErrorListener, OnCompletionListener {
 
MediaPlayer mp;
ProgressDialog pd;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
   if(mp!= null){ mp.stop();}
   else{
Button bt = (Button)findViewById(R.id.play);

bt.setOnClickListener(this);
}
}
public void onCompletion(MediaPlayer arg0) {
 pd.dismiss();
 Toast.makeText(getApplicationContext(), Completed, 
Toast.LENGTH_LONG).show();   
// mp.start();
}
public boolean onError(MediaPlayer mp, int what, int extra) {
 pd.dismiss();
return false;
}
public void onPrepared(MediaPlayer mp) {
 Log.i(StreamAudioDemo, finished);
   pd.setMessage(Playing.);
  mp.start();

}
public void onClick(View arg0) {
 try
{
pd = new ProgressDialog(this);
pd.setMessage(Buffering.);
pd.show();
mp = new MediaPlayer();
mp.setAudioStreamType(AudioManager.STREAM_MUSIC);
mp.setOnPreparedListener(this);
mp.setOnErrorListener(this);
   
mp.setDataSource(http://www.robtowns.com/music/blind_willie.mp3;);
  
  
 
mp.prepareAsync();
mp.setOnCompletionListener(this);
}
catch(Exception e)
{
Log.e(StreamAudioDemo, e.getMessage());
}
}
}

Re: [android-developers] Audio streaming application

2012-12-21 Thread Ali
Thanks Talha for the quick response and code details.

Will this support pause/play ? and navigation like next/prev tracks etc

On Saturday, December 22, 2012 9:52:16 AM UTC+3, Talha Qamar wrote:

 Hi i have sent u the simple code needed for audio streaming.Check it.Its 
 working.
 HaPpY CoDiNg :)
 Regards,
 Talha Qamar.

 On Sat, Dec 22, 2012 at 11:05 AM, Ali aliw...@gmail.com javascript:wrote:

 Hi All,

 We are looking to develop an Audio streaming application where we have 
 the media files on a web server and have users browse them and play them on 
 android phones. What is the best approach to develop this. Would be 
 helpfule if you can share your experiences and best practices.

 Thanks for your time.

 Cheers,
 Ali

 -- 
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to 
 android-d...@googlegroups.comjavascript:
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com javascript:
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Audio Streaming

2012-11-22 Thread Karunakaran Vikash
Hi everyone..
  I need to stream an audio file ,from an Android device to another 
Android device 
 I need to seek it back... with out any breaks , i have to play the 
songs... Which rule is possible... !!!
send me some ideas regarding that ... .

  Same for Video Streaming tooo... I need to stream a video from an 
android mobile to another android mobile device ...  any idea abt RTSP !! 
or HTTP 

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Audio Play

2012-11-01 Thread TreKing
On Thu, Nov 1, 2012 at 12:23 AM, Sadhna Upadhyay
sadhna.braah...@gmail.comwrote:

 Hi everybody i am playing a audio o button click then it is playin twice
 on single click why it is happening,i dont know please help me if any one
 of you know the reason.


Read http://www.catb.org/esr/faqs/smart-questions.html, then try again.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Audio Play

2012-10-31 Thread Sadhna Upadhyay
 Hi everybody i am playing a audio o button click then it is playin twice
on single click why it is happening,i dont know please help me if any one
of you know the reason.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Audio Over Bluetooth Mono Headset working in Gingerbread and not ICS

2012-10-24 Thread Ahmed Abdelfattah


I have written a simple app that records and plays audio through a 
Bluetooth Mono headset usingstartBluetoothSco(). The app works fine on 
Gingerbread but fails to work on ICS. The output of logcat is strange

D/BluetoothSocket.cpp( 1554): ...connect(76, SCO) = 0 (errno 115)
D/BluetoothSocket( 1554): called connectNative
D/Bluetooth HS/HF( 1554): mOutgoingSco.connect() success!
D/Bluetooth HS/HF( 1554): connectSco()
D/Bluetooth HS/HF( 1554): Routing audio for outgoing SCO conection
D/BluetoothHeadset( 1554): setAudioState
D/BluetoothHeadset( 1554): setAudioState
D/Bluetooth HSHFP( 1554): AudioStateIntent: 00:23:7F:EB:4F:10 State: 12 
PrevState: 11 
D/BluetoothSocket.cpp( 1554): readNative
D/BluetoothSocket.cpp( 1554): readNative
D/BluetoothSocket.cpp( 1554): readNative
D/BluetoothSocket.cpp( 1554): readNative
D/BluetoothSocket.cpp( 1554): readNative
D/BluetoothSocket.cpp( 1554): readNative
D/BluetoothSocket.cpp( 1554): readNative
D/BluetoothSocket.cpp( 1554): readNative
D/BluetoothSocket.cpp( 1554): readNative

It keeps calling the Native read from socket function till the app (sco 
connection) is terminated . It's worth mentioning that  tried tha app on 
Samsung Galaxy Mini(Gingerbread) , HTC (Gingerbread) , pandaboard(ICS) and 
ODROID-X(ICS). 

Any suggestions for why the app stucks and readNative is being repeatably 
called ?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] audio to text convesion in android

2012-10-08 Thread Nakul Maheshri
 Hello,
  I want to convert audio file into text in android  audio file is 
located at sdcard
  How to do that? is there any web service is available to do that?


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Audio-Streaming IOException: Prepare failed.: status=0xFFFFFFF6

2012-08-25 Thread Dmitriy F
Android 2.3 Mediaplayer can't play none of those 
audiostreamshttp://radio02-cn03.akadostream.ru:8114/resulting in 
`W/System.err(19610): java.io.IOException: Prepare failed.: 
status=0xFFF6`. However, the same stream works fine on Android 4.0. 

Is there anything I can provide the app with to make it work on Android 2.3 
platform ?

Thanks.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Audio Focus, ICS lockscreen controls (RemoteControlClient) and foreground app

2012-08-02 Thread b0b
I've noticed a weird behaviour with music lock screen appearance and I'm 
curious to 
learn if it is a bug or something intended.

An app can show music lock screen control if it has the Audio focus and has 
registered a RemoteControlClient instance
with AudioManager.registerRemoteControlClient(). 

Now consider the following sequence

1. Launch Google Music. It shows the lock screen controls if you display 
the lock screen. fine
2. Launch another music player like PowerAMP. Make it plays something. It 
takes the audio focus and  shows its lock screen controls if you display 
the lock screen. fine
3. Go back to Google Music. PowerAMP is still playing music (because Google 
Music had no reason to take the focus) but the lock screen controls for it 
are not showing anymore (no lock screen controls at all)

Is that normal ? Expected behaviour would be that PowerAMP lock screen 
controls still show until Google Music take the audio focus but it seems 
that any app having a RemoteControlClient registered 
cancel any other RemoteControlClient from a playing background app.

Note that the exact same thing happen as described above if you swap Google 
Music and PowerAMP in the text.

I'm asking that question because my app which manage lock screen controls 
behaves like above, removing the lock screen controls of any background 
playing app, when my app go into the foreground (without requesting audio 
focus).

PS: the documentation of RemoteControlClient doesn't mention at any point 
the relation with the audio focus, which is really a glaring omission.



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Audio Capture

2012-07-31 Thread Meena Rengarajan
I have created a file name music_1.amr.. When i recording audio it will 
capture and stored in music_1.amr . So i can do play, stop or save.. Now 
i wanna do is, whenever i create a new audio recording that previous 
recorded audio should be deleted automatically and this new audio capture 
must store it in same file name music_1.amr. What do i wanna do here . 
Can anyone suggest me?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Audio Capture

2012-07-31 Thread Asheesh Arya
create a file with the same name in your source code!!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Audio Book

2012-07-31 Thread Ray da Costa
Look, my tip is to separate the file, ie, in separate chapters and confome it
is using the audio drops, as he listens to an audio already is lowering others
and so on, all in the backend, the separation is the key ...

2012/7/30 Plabon Modak plabonmo...@gmail.com

 Hi Guys,

 I am working on an application where i need to download large audio
 files(30 mb). After purchasing user can download the audio files. So i am
 wondering that if i download the files from server there might be internet
 connection problem midle of the download(files are big). Because these
 files are paid(in app purchase) what should be the proper way of doing
 this. I need suggessions.

 Is there any audio book in google play like Iphone have? If yes please
 send me the link.

 Thanks
 Plabon Modak


  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Ray da Costa
The best way to predict the future is to invent it.
Alan Kay

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Audio Capture

2012-07-31 Thread Meena Rengarajan
This is my code. I am beginner in Android .Can anyone tell me ? What 
mistake i have done here 

String OUTPUT_FILE=Environment.getExternalStorageDirectory()+/music_1.amr;


private void beginRecording() throws Exception  {
   bMediaRecorder();
   //try{
   File outFile=new File(OUTPUT_FILE);
   // }
   if(outFile.exists())
outFile.delete();

recorder=new MediaRecorder();
recorder.setAudioSource(MediaRecorder.AudioSource.CAMCORDER);
recorder.setOutputFormat(MediaRecorder.OutputFormat.RAW_AMR);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.DEFAULT);
recorder.setOutputFile(OUTPUT_FILE);
recorder.prepare();
recorder.start();
 }

private void bMediaRecorder() {
// TODO Auto-generated method stub
 if(recorder!=null)
recorder=null;
recorder.release();


On Tuesday, July 31, 2012 12:09:37 PM UTC+5:30, asheesh arya wrote:

 create a file with the same name in your source code!!


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Audio Book

2012-07-30 Thread Plabon Modak
Hi Guys,

I am working on an application where i need to download large audio
files(30 mb). After purchasing user can download the audio files. So i am
wondering that if i download the files from server there might be internet
connection problem midle of the download(files are big). Because these
files are paid(in app purchase) what should be the proper way of doing
this. I need suggessions.

Is there any audio book in google play like Iphone have? If yes please send
me the link.

Thanks
Plabon Modak

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Audio Capture in Android

2012-07-26 Thread Meena Rengarajan
Hi all , 
   This is my code,  I am very new to Android . Please can anyone 
help me .. I wanna record, play, save and stop in Audio Capture, when i 
click button all these actions should be taken . My code is here , in 
Emulator output is displaying but in my mobile , it doesnt able to identify 
the location of file uri and file name . What should i do in this?


public class AudioCaptureActivity extends Activity {
TextView tv;
Button recordBtn;
Button playBtn;
Button saveBtn;
Button stopBtn;
Button finishBtn;
MediaPlayer mp;
MediaRecorder mr;
Intent audioIntent;
Uri mCapturedAudioUri;
String path;
int playBackPosition=0;
int RQS_RECORDING = 1; 
int requestCode=0;
 public static int RECORD_REQUEST=0;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
tv=(TextView)findViewById(R.id.AudioCapture);
recordBtn=(Button)findViewById(R.id.recordBtn);
playBtn=(Button)findViewById(R.id.playBtn);
saveBtn= (Button)findViewById(R.id.saveBtn);
stopBtn=(Button)findViewById(R.id.stopBtn);

recordBtn.setOnClickListener(new OnClickListener() {
 @Override
public void onClick(View v) {
 //mp= new MediaPlayer();
//mr.setAudioSource(MediaRecorder.AudioSource.MIC);
//mr.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
//mr.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
//FileDescriptor PATH_NAME = null;
//mr.setOutputFile(PATH_NAME);
   try {
 path = Environment.getExternalStorageDirectory()+/audio_meena.AMR;
 File newFile = new File(path);
 Uri uri =Uri.fromFile(newFile);
 Intent audioIntent=new Intent(MediaStore.Audio.Media.RECORD_SOUND_ACTION);
 
 startActivityForResult(audioIntent, RQS_RECORDING);
 
 

} catch (Exception e) {
// TODO: handle exception
}
}
});

playBtn.setOnClickListener(new OnClickListener() {
 @Override
public void onClick(View v) {
playAudio();

 // TODO Auto-generated method stub
}
  private void playAudio() {
// TODO Auto-generated method stub
  }
});
  saveBtn.setOnClickListener(new OnClickListener() {
 @Override
public void onClick(View v) {
saveAudio();
// TODO Auto-generated method stub
 }
   private void saveAudio() {
// TODO Auto-generated method stub
 }
});
  
   stopBtn.setOnClickListener(new OnClickListener() {
 @Override
public void onClick(View v) {
//if(v==finishBtn){
// finish();
 // } else if(v==stopBtn) 
{
 mr.stop();
mr.release(); 
}
// TODO Auto-generated method stub
 }
});
 }
//public void onActivityResult (int requestCode, int resultCode, Intent 
data) {
//if(requestCode==1){
// if(resultCode==RESULT_OK){
// Uri mCapturedAudioUri=audioIntent.getData();
// playAudio(mCapturedAudioUri);
// }
// }

 //  }
private void playAudio(Uri mCapturedAudioUri2) {
// TODO Auto-generated method stub
 }

}




-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Audio sampling

2012-07-23 Thread Haris


Hai...all..
 
I am new in android.. I just test the code for audio recording from the 
android developer site. It recorded fine using the AVD manager... 
But I am not able to see the recorded file in AVD Also I need sampling 
rate for each second of the recorded audio...Is it possible to create such 
an application in android..

Please Help...

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Audio Stream buffers within 8 secs on Emulator but takes almost 50 secs to buffer on a Phone

2012-07-16 Thread Zoheb Rahman


I have tried the code on the emulator using Platform 2.2 API level 8 as 
well as an Emulator using Platform 4.0.3 using API level 15 .. it works 
perfectly and starts the stream in about 5 secs. But when i run the code on 
my HTC one x (Android Version 4.0.3)or tried running it on the HTC Desire 
S(Android Version 2.3.5) it takes over 50 secs to stream

Here is my code

public static MediaPlayer mp; 
public String url = http://vprbbc.streamguys.net:80/vprbbc24.mp3;;

 public void onCreate(Bundle savedInstanceState) {
 mp = new MediaPlayer();
 try { 

mp.setDataSource(url);
mp.setOnErrorListener(this);
mp.setOnPreparedListener(this);
mp.prepareAsync();
 }
  catch(IOException e){
e.printStackTrace();
} 
}  // close of onCreate

 public void onPrepared(MediaPlayer player) {
  mp.start();
 }

it is not a problem with the internet connection. I have both the emulator 
and the phone running on the same internet connection.

I am just using the BBC internet radio steam for testing

Please help - i need this working soon. 

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Audio Stream buffers within 8 secs on Emulator but takes almost 50 secs to buffer on a Phone

2012-07-16 Thread Zoheb Rahman


I have tried the code on the emulator using Platform 2.2 API level 8 as 
well as an Emulator using Platform 4.0.3 using API level 15 .. it works 
perfectly and starts the stream in about 5 secs. But when i run the code on 
my HTC one x (Android Version 4.0.3)or tried running it on the HTC Desire 
S(Android Version 2.3.5) it takes over 50 secs to stream

Here is my code

 public static MediaPlayer mp; 
public String url = http://vprbbc.streamguys.net:80/vprbbc24.mp3;;

 public void onCreate(Bundle savedInstanceState) {
 mp = new MediaPlayer();
 try { 

mp.setDataSource(url);
mp.setOnErrorListener(this);
mp.setOnPreparedListener(this);
mp.prepareAsync();
 }
  catch(IOException e){
e.printStackTrace();
} 
}  // close of onCreate

 public void onPrepared(MediaPlayer player) {
  mp.start();
 

There is no issue with the internet connection. Both the phone and the emulator 
are connected to the same internet connection.

I have also tried running the code on a samsung tab and the streams starts up 
in roughly 6 secs. 

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Audio Record Class Produces a lot of noise when recording

2012-05-27 Thread AJ_SHEHAN
I am using audio recorder class to record and audio file, but when i print 
an input array that the buffer produces, as i want to manipulate this 
input, i do not get any pattern of a proper wave. It is producing a lot of 
noise. Please help me with this. I have used all the parameters as 
specified. given bellow is the code,

public static short[] buffer;
 public static int sampleRateInHz = 8000;
 public static int audioChannelConfig = 
AudioFormat.CHANNEL_CONFIGURATION_MONO;
 public static int audioFormat_Encoding = AudioFormat.ENCODING_PCM_16BIT;
 public static int audioSource = MediaRecorder.AudioSource.DEFAULT;


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Audio Record Class Produces a lot of noise when recording

2012-05-27 Thread asheesh arya
juzz go through this link
http://code.google.com/p/krvarma-android-samples/source/browse/#svn/trunk/AudioRecorder.2might
be it helpful for you!!!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Audio / Performance Issues on ICS / Android 4

2012-04-27 Thread piezo
Hello


I have a music (sequencer/synth) app in Android Market. One of its
strengths is that it uses very little resources and plays smoothly
even on the oldest and cheapest devices and only requires Android
version 1.6.

However, since the arrival of ICS, I get more and more complaints
about stuttering playback and a sluggish interface, mainly on Galaxy
Nexus. The app hasn't changed and still works fine on earlier versions
of Android.

I wonder what may have changed.

My app does the audio processing in native code and I suspect the way
data are passed between java and native might be the problem (I still
use AudioTrack to maintain 1.6 compatibility and because it always
worked fine):

public class PlayThread extends Thread
{
public void run()
{
ByteBuffer byteBuffer = ByteBuffer.allocateDirect(minSize);
byte[] byteArray = new byte[minSize];


android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_URGENT_AUDIO);
int minSize =AudioTrack.getMinBufferSize( 44100,
AudioFormat.CHANNEL_CONFIGURATION_STEREO,
AudioFormat.ENCODING_PCM_16BIT );
myTrack = new AudioTrack( AudioManager.STREAM_MUSIC,
44100, AudioFormat.CHANNEL_CONFIGURATION_STEREO,
AudioFormat.ENCODING_PCM_16BIT, 
minSize, AudioTrack.MODE_STREAM);

myTrack.play();

while(1)
{
byteBuffer.position(0);
processNativeAudio(byteBuffer, minSize);
byteBuffer.position(0);
byteBuffer.get(byteArray, 0, minSize);
myTrack.write( puff, 0, minSize );
}
}
}

In the main activity, a new PlayThread is created on startup. The
native function looks like this:

void Java_com_myapp_ processNativeAudio( JNIEnv *  env, jobject this,
jobject buffer , jint buflng)
{
jbyte *jbuffer = (*env)-GetDirectBufferAddress(env, buffer);
short *shortBuffer= (short*)(jbuffer);

// processing audio here and writing to shortBuffer
}


Anyone has similar problems or even knows a workaround?

Thank you.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] -audio coreaudio no longer works

2012-03-10 Thread Keith Wiley
I used to be able to simulate audio recording in the emulator by
passing in -audio coreaudio.  Something has changed though (I've
undergone several SDK updates of course) and now my app doesn't get
any audio.  It initializes AudioRecord just fine but each call to
mAudioRecord.read() leaves the buffer full of 0s.  It returns the
buffer length so it acts like it put bytes in the buffer, but it put
0s as if it isn't getting any audio signal at all.

Any ideas what changed or how to fix it?

Thanks.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Audio not work in emulator

2012-02-16 Thread Jagruti Sangani
hello,
I am using the fedora 15.when i start the emulator then the warning is
display that emulator: warning: opening audio output failed.so what
is the solution.Is it problem of emulator not support or fedora?.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Audio not work in emulator

2012-02-16 Thread Ranjith Kumar
Hi,

I am using Windows7 even i get the same Warning when i start emulator at
times. so i guess it has no problem with fedora

On Thu, Feb 16, 2012 at 7:09 PM, Jagruti Sangani 
jagruti.sang...@inextrix.com wrote:

 hello,
 I am using the fedora 15.when i start the emulator then the warning is
 display that emulator: warning: opening audio output failed.so what
 is the solution.Is it problem of emulator not support or fedora?.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Audio Latency big problem on some devices

2012-02-04 Thread RLScott
You wouldn't think 1024 samples at 22050 samples per second was
especially low latency.  And on most devices, using the AudioRecord
class I have no trouble in getting individual buffers of 1024 samples
(about 20 buffers per second) evenly spaced in time.  But on at least
one device, the timing seems to be very irregular.  My application is
a musical instrument tuner, and it is important to get small buffers
in a timely manner.  So I tested the timing by logging the time
between reads.  Here is the timing in milliseconds using an original
Motorola Droid:

  37 36 62 46 42 31 62 47 41 31

Nice!  But here is the same info from a no-name Chinese tablet running
2.3.1:

359  0  0  0  0  1  0  0  366  0  0 ...

It is apparent that the no-name tablet is batching the audio data into
blocks of 8192 samples. So I get 8 buffers in rapid succession and
then have to wait another 360 milliseconds for the next buffer.

Most devices behave more like the Droid, with latency low enough to
deliver evenly-spaced buffers of 1024 samples.  But I sure hope there
aren't too many devices like that no-name tablet.  Anyone have any
updated insight into the problem of audio latency?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Audio Latency big problem on some devices

2012-02-04 Thread Mark Murphy
For devices that legitimately have the Android Market, audio latency
has had requirements in the CDD since Android 2.2:

http://source.android.com/compatibility/downloads.html

I am not expert enough on the topic to know whether the requirements
specified in the CDD meet your needs or not.

You will have two potential problems with a no-name Chinese tablet:

1. It might not have the Market at all

2. It might have a pirated copy of the Market

In either case, they did not necessarily meet the CDD for their
specific version of Android, and all bets are off.

On Sat, Feb 4, 2012 at 11:16 AM, RLScott fixthatpi...@yahoo.com wrote:
 You wouldn't think 1024 samples at 22050 samples per second was
 especially low latency.  And on most devices, using the AudioRecord
 class I have no trouble in getting individual buffers of 1024 samples
 (about 20 buffers per second) evenly spaced in time.  But on at least
 one device, the timing seems to be very irregular.  My application is
 a musical instrument tuner, and it is important to get small buffers
 in a timely manner.  So I tested the timing by logging the time
 between reads.  Here is the timing in milliseconds using an original
 Motorola Droid:

  37 36 62 46 42 31 62 47 41 31

 Nice!  But here is the same info from a no-name Chinese tablet running
 2.3.1:

 359  0  0  0  0  1  0  0  366  0  0 ...

 It is apparent that the no-name tablet is batching the audio data into
 blocks of 8192 samples. So I get 8 buffers in rapid succession and
 then have to wait another 360 milliseconds for the next buffer.

 Most devices behave more like the Droid, with latency low enough to
 deliver evenly-spaced buffers of 1024 samples.  But I sure hope there
 aren't too many devices like that no-name tablet.  Anyone have any
 updated insight into the problem of audio latency?

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en



-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in NYC: http://marakana.com/training/android/

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Audio During a Call

2012-01-30 Thread William Qaqish
Experts,
  Numerous blogs state that in-call audio is not accessible however, a 
recent forum about the Galaxy S ( 
http://forums.whirlpool.net.au/archive/1637137 ) implies that you are 
capable of playing audio to the caller.  Has access to in-call audio been 
now available to allow audio files to be played to the caller?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Audio During a Call

2012-01-30 Thread Mark Murphy
I'd describe that as a bug in that device.

On Sun, Jan 29, 2012 at 9:03 PM, William Qaqish williamq2...@gmail.com wrote:
 Experts,
   Numerous blogs state that in-call audio is not accessible however, a
 recent forum about the Galaxy S (
 http://forums.whirlpool.net.au/archive/1637137 ) implies that you are
 capable of playing audio to the caller.  Has access to in-call audio been
 now available to allow audio files to be played to the caller?

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en



-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_Android Programming Tutorials_ Version 4.1 Available!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Audio During a Call

2012-01-30 Thread Kristopher Micinski
Right, it should not be accessible from Android.

kris

On Mon, Jan 30, 2012 at 12:08 PM, Mark Murphy mmur...@commonsware.com wrote:
 I'd describe that as a bug in that device.

 On Sun, Jan 29, 2012 at 9:03 PM, William Qaqish williamq2...@gmail.com 
 wrote:
 Experts,
   Numerous blogs state that in-call audio is not accessible however, a
 recent forum about the Galaxy S (
 http://forums.whirlpool.net.au/archive/1637137 ) implies that you are
 capable of playing audio to the caller.  Has access to in-call audio been
 now available to allow audio files to be played to the caller?

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en



 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://github.com/commonsguy
 http://commonsware.com/blog | http://twitter.com/commonsguy

 _Android Programming Tutorials_ Version 4.1 Available!

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Audio During a Call

2012-01-30 Thread Kristopher Micinski
Along with that, that isn't really a reputable source, so much as a
half baked forum post from some guy...

kris

On Mon, Jan 30, 2012 at 12:25 PM, Kristopher Micinski
krismicin...@gmail.com wrote:
 Right, it should not be accessible from Android.

 kris

 On Mon, Jan 30, 2012 at 12:08 PM, Mark Murphy mmur...@commonsware.com wrote:
 I'd describe that as a bug in that device.

 On Sun, Jan 29, 2012 at 9:03 PM, William Qaqish williamq2...@gmail.com 
 wrote:
 Experts,
   Numerous blogs state that in-call audio is not accessible however, a
 recent forum about the Galaxy S (
 http://forums.whirlpool.net.au/archive/1637137 ) implies that you are
 capable of playing audio to the caller.  Has access to in-call audio been
 now available to allow audio files to be played to the caller?

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en



 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://github.com/commonsguy
 http://commonsware.com/blog | http://twitter.com/commonsguy

 _Android Programming Tutorials_ Version 4.1 Available!

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Audio jack for other functions

2011-12-21 Thread PhotoSteve
How would you get access to the audio jack to perform other
functions(aka the Square Up CC reader)?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Audio streaming to Java server

2011-12-20 Thread Giuseppe
Dear Experts,
I had now spend 10 days to find an answer to my question, but no way!!!

I understood how to send an audio streaming to a socket using the following 
code, but I don't know how to listen the audio on the server side or how to 
save it in local file.

Any help is welcome.

String hostname = 192.168.1.10;
int port = 8000;

Socket socket = null;
try {
socket = new Socket(InetAddress.getByName(hostname), port);
} catch (UnknownHostException e) {
 e.printStackTrace();
} catch (IOException e) {
 e.printStackTrace();
}

ParcelFileDescriptor pfd = ParcelFileDescriptor.fromSocket(socket);

recorder = new MediaRecorder();
recorder.setAudioSource(MediaRecorder.AudioSource.MIC);

recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
recorder.setOutputFile(pfd.getFileDescriptor());

try {
recorder.prepare();
} catch (IllegalStateException e) {
 e.printStackTrace();
} catch (IOException e) {
 e.printStackTrace();
}

recorder.start();

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Audio backwards compatibility of ICS

2011-12-09 Thread gew
Has anyone had trouble porting an application that uses the microphone
to ICS?

Interestingly enough, my application works when compiled for 2.3.3 and
installed on a 4.0 device.

But when I compile for 4.0 it no longer captures audio.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Audio is not playing on my Google TV application

2011-12-08 Thread Gregory Moore
I am porting a game to be supported on Google TV, and everything is
working except for the audio.   I get some kind of default sound
instead of the actual audio that should be played.  I am using the
SoundPool class to play .mp3 files.

Any one dealt with this issue?   Resolutions?

Thanks,
Greg

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Audio Overlay

2011-11-22 Thread AC
I'm trying to combine two audio files. I want one file to play at the
same time as another. An example would be to take lyrics and play them
over beats. It is easy to play them at the same time, but I need to
generate a MP3 that combines the two, one over the other, not one
after the other. I know tools like FFMPEG can be used for this, but is
there anything native in Android or anything in Java  compatible with
Android that could accomplish this?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Audio library for Android .

2011-11-10 Thread J Handal
I want to  visualize and analyze recorded audio files, is there a  third
party audio library out there?

Thanks.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Audio library for Android .

2011-11-10 Thread Christopher Van Kirk
You can have a look at pdlib for Android, but I think you'll find that 
the audio layer of Android is quite immature at the moment. If you're 
intending to do anything visually that should be synchronized with the 
sound you can pretty much forget about it.


On 11/11/2011 1:24 PM, J Handal wrote:

and analyze reco


--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Audio Transmission over Bluetooth.

2011-11-08 Thread Aditya Singal
Hi,
I wish to know how Audio data is transmitted over Bluetooth channel.
What I mean to ask is, if I have a stream of bytes of audio data, what
kind of conversion or encoding is required before transmission.
Aditya

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] audio abnormal behaviour

2011-10-26 Thread houxiang zhu
Hello,

I am porting android to HDK7108 board which is a sh4 architecture CPU.

I have alsa driver/alsa-lib/alsa-utils/alsa_asound compiled into the
system, and when system start up:

If I don't run stop media, alsa_aplay will report device busy.
I stop media, then alsa_aplay works.
then if I start media, Game Jetboy or other game has audio comes
out.

The problem is that after quit the game and start the game again, no
audio comes out.
and if I run stop media again, system will become very very slow and
other applications won't comes out (report unexpected error, etc).
with message like the following:

binder: release proc 1638, transaction 6242, not freed


what could be wrong? audio service config?

Thanks,
Houxiang

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Audio on Bluetooth

2011-10-04 Thread giangiammy
hi all,

I have an application sending the voice output to the speaker.
I'd like to send the audio on a bluetooth earset when it is connected.

If I connect the wired earset, the audio is automatically routed to wired 
earset,
while if I have a bluetooth earset connected, the audio keep going
to the speaker.

(with a telephone call the bluetooth correctly get the audio)

From what I understand, I must manually route the audio to the bluetooth,
but how?

I tested:

am.setBluetoothA2dpOn();

and

am.setBluetoothScoOn(true);

am is  

AudioManager am = (AudioManager) 
context.getSystemService(Context.AUDIO_SERVICE);

but anything goes to bluetooth, and by the way

am.isBluetoothScoOn()

returns false.

Do I need particular permission?
Any advice on the correct steps to have audio on bluetooth
(mono or stereo is the same ... quality is not a must).

thanks
Giammy


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Audio routing

2011-08-23 Thread Amritendu Biswas
Hi,

I am trying to create one application/service which will record incoming
voice call and auto answer with pre-recorded media. That means instead of
playing incoming voice data to speaker/headset it will be recorded as a
media file and rather than taking voice input from mic/headset, it will be
taken from media file.

I searched in various forum and some people say it can be possible with ALSA
routing. But I don't see much clarity on this. I am ok in modifying source
code and use as custom ROM.

Please let me know whether this can be achieved or not. If yes please point
me the area (code path, framework) I need to look in.

Thanks,
Amritendu

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Audio routing

2011-08-23 Thread Mark Murphy
On Tue, Aug 23, 2011 at 2:36 AM, Amritendu Biswas
amritendu.bis...@gmail.com wrote:
 I am trying to create one application/service which will record incoming
 voice call and auto answer with pre-recorded media. That means instead of
 playing incoming voice data to speaker/headset it will be recorded as a
 media file and rather than taking voice input from mic/headset, it will be
 taken from media file.

This is not possible via the Android SDK.

 I searched in various forum and some people say it can be possible with ALSA
 routing. But I don't see much clarity on this. I am ok in modifying source
 code and use as custom ROM.

Questions regarding modifying the firmware belong on one of the Google
Groups found on http://source.android.com in the Community tab.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_Android Programming Tutorials_ Version 3.9 Available!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Audio routing

2011-08-23 Thread Amritendu Biswas
Thanks Mark for your reply. I will post my query in Open Source
Android Community.

On Tue, Aug 23, 2011 at 12:11 PM, Mark Murphy mmur...@commonsware.com wrote:
 On Tue, Aug 23, 2011 at 2:36 AM, Amritendu Biswas
 amritendu.bis...@gmail.com wrote:
 I am trying to create one application/service which will record incoming
 voice call and auto answer with pre-recorded media. That means instead of
 playing incoming voice data to speaker/headset it will be recorded as a
 media file and rather than taking voice input from mic/headset, it will be
 taken from media file.

 This is not possible via the Android SDK.

 I searched in various forum and some people say it can be possible with ALSA
 routing. But I don't see much clarity on this. I am ok in modifying source
 code and use as custom ROM.

 Questions regarding modifying the firmware belong on one of the Google
 Groups found on http://source.android.com in the Community tab.

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://github.com/commonsguy
 http://commonsware.com/blog | http://twitter.com/commonsguy

 _Android Programming Tutorials_ Version 3.9 Available!

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Audio Bluetooth + wired headset

2011-08-08 Thread Nic007
Hi,

First I just want to advertise you: English is not my primary
language, so please be conciliant about my message.

So, first of all I have a Galaxy S with Darky 10.1 (Gingerbread
2.3.3?).

I have a tuner FM who can be use when wired earphones are plugged, and
I have too a stereo Bluetooth headphones. I want to hear radio througt
my bluetooth, even if my wired are there for the antenna. I tried a
lot of applications and nothing worked

So I want to make my own application, and now I want to know, can I
transmit audio output to my bluetooth without disconnect earphones. I
need them both activate to use a Tuner FM.

I'm trying with your resources to do something with the AudioManager
Class, but I don't know how to do something like that. It's seem
hard

Thanks

Nic007

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Audio Recorder

2011-08-04 Thread Nico Balestra
Hi,
you should do

String name = Environment.getExternalStorageDirectory().getAbsolutePath() +
/Logger;

to get the right mount point for your sd card.

Hope this helps.

Nico

2011/8/4 Ab Caballero a...@mac.com

 I'm trying to provide an audio recorder within an application for the
 user to dictate notes. I keep getting an error that there is no valid
 output file and that the external storage is not available (I know it
 is because i am using it in a separate activity). Any thoughts would
 be appreciated.

 private void recordAudio(){
MediaRecorder recorder = new MediaRecorder();
recorder.setAudioSource(MediaRecorder.AudioSource.MIC);

  recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
checkStorage();
recorder.setOutputFile(/sdcard/Logger);
try {
recorder.prepare();
}
catch (IllegalStateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
recorder.start();   // Recording is now started
}

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Audio Recorder

2011-08-03 Thread Ab Caballero
I'm trying to provide an audio recorder within an application for the
user to dictate notes. I keep getting an error that there is no valid
output file and that the external storage is not available (I know it
is because i am using it in a separate activity). Any thoughts would
be appreciated.

private void recordAudio(){
MediaRecorder recorder = new MediaRecorder();
recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
checkStorage();
recorder.setOutputFile(/sdcard/Logger);
try {
recorder.prepare();
}
catch (IllegalStateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
recorder.start();   // Recording is now started
}

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Audio

2011-07-07 Thread kaushik p
Hi

all is there any way we can our own voice for the button click . I want some
.mp3 file to be played when a button is clicked . Can anyone  please help me
do it ?

-- 
ThanksRegards
Kaushik Pendurthi

http://kaushikpendurthi.blogspot.com/

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Audio

2011-07-07 Thread TreKing
On Thu, Jul 7, 2011 at 5:06 AM, kaushik p kaushiks...@gmail.com wrote:

 I want some .mp3 file to be played when a button is clicked . Can anyone
  please help me do it ?


What have you tried so far?

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Audio Editing

2011-06-07 Thread sunny ghai
I need some guidance regarding audio editing in android.

Problem: I want to change pitch and speed of sound file independently.

currently I am using SoundPool for that, it is changing the rate of
the sound which effects both pitch and the sound at a same time.

Is there is any external library (Like Dirac for iphone) for
achieving it ?



Thanks




-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] audio output level?

2011-05-23 Thread cjl
Is there a way to determine the audio output level of a currently
playing sound? I found examples of getmaxamplitude when recording from
the microphone, but couldn't find anything that discussed a playing
sound's amplitude. Let's say I wanted to create an audio meter or move
a sprite based on the amplitude of playing sound. Can anyone point me
in the right direction?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Audio streaming

2011-05-17 Thread Sebastian Breit
I'm interested in developing an Android app that is able to connect
two android devices and stream audio so they are able to talk. Not as
sofisticated as Skype :)
What libraries or methods would you recommend me to use?  Ive
programmed a lot of things but never something like that (audio and
streaming). Is it possible to record from the microphone and stream it
while recording?
Ive seen that the Audiorecord api provides the recorded audio in
buffers...that's a start... but for sending and receiving it?
any ideas?
thanx!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Audio input funciton via 3.5mm / headphone jack?

2011-04-28 Thread Drew
How do I receive input from the audio jack (from a headset with built
in microphone)? Is it auto switched when the headset is inserted? Is
it a function of HeadsetObserver.java?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Audio recorder

2011-04-26 Thread Mark Murphy
On Tue, Apr 26, 2011 at 12:57 AM, cibin cibin.p.oom...@gmail.com wrote:
 Can we recommend any  lower level code in Audio recorder, maybe
 accessing native functions?

OpenSL was added in a recent Android update for access via the NDK.
There is nothing lower level than AudioRecord from the SDK.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Audio recorder

2011-04-25 Thread cibin
Does the Android platform provide an API to process audio inputs in
real time, other than the methods provided by the AudioRecord class?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Audio recorder

2011-04-25 Thread cibin
If the AudioRecord class contains the optimum methods, can it dump the
buffer often enough to meet the desired latency of 16ms?  Can we be
completely confidant that each sample will be processed?  (we cannot
miss any samples, unless we know that they were missed)

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Audio recorder

2011-04-25 Thread cibin
Can we recommend any  lower level code in Audio recorder, maybe
accessing native functions?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Audio initialization and recording

2011-04-08 Thread Kamil
Hi,
I'm having problem with audio initialization in Android. When
application starts recording in logcat appears message

I/libpjsip( 2248):  15:19:25.328 android_jni_de  Record thread : error
while reading data... is there something we can do here? -3
D/libpjsip( 2248):  15:19:25.328   Master/sound  Underflow, buf_cnt=0,
will generate 1 frame
I/libpjsip( 2248):  15:19:25.342 android_jni_de  Record thread : error
while reading data... is there something we can do here? -3
D/libpjsip( 2248):  15:19:25.349   Master/sound  Underflow, buf_cnt=0,
will generate 1 frame
I/libpjsip( 2248):  15:19:25.354 android_jni_de  Record thread : error
while reading data... is there something we can do here? -3
D/libpjsip( 2248):  15:19:25.357   Master/sound  Underflow, buf_cnt=0,
will generate 1 frame
I/libpjsip( 2248):  15:19:25.367 android_jni_de  Record thread : error
while reading data... is there something we can do here? -3
D/libpjsip( 2248):  15:19:25.379   Master/sound  Underflow, buf_cnt=0,
will generate 1 frame
I/libpjsip( 2248):  15:19:25.380 android_jni_de  Record thread : error
while reading data... is there something we can do here? -3
I/libpjsip( 2248):  15:19:25.393 android_jni_de  Record thread : error
while reading data... is there something we can do here? -3
D/libpjsip( 2248):  15:19:25.404   Master/sound  Underflow, buf_cnt=0,
will generate 1 frame
I/libpjsip( 2248):  15:19:25.405 android_jni_de  Record thread : error
while reading data... is there something we can do here? -3
I/libpjsip( 2248):  15:19:25.418 android_jni_de  Record thread : error
while reading data... is there something we can do here? -3
I/libpjsip( 2248):  15:19:25.431 android_jni_de  Record thread : error
while reading data... is there something we can do here? -3
D/libpjsip( 2248):  15:19:25.434   Master/sound  Underflow, buf_cnt=0,
will generate 1 frame
D/libpjsip( 2248):  15:19:25.439   Master/sound  Underflow, buf_cnt=0,
will generate 1 frame
I/libpjsip( 2248):  15:19:25.444 android_jni_de  Record thread : error
while reading data... is there something we can do here? -3
I/libpjsip( 2248):  15:19:25.457 android_jni_de  Record thread : error
while reading data... is there something we can do here? -3
D/libpjsip( 2248):  15:19:25.460   Master/sound  Underflow, buf_cnt=0,
will generate 1 frame

Can somebody tell me what's that message?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Audio streaming via Bluetooth

2011-03-28 Thread Rimma Sukhovsky
Is it possible to stream and play audio to the phone via Bluetooth?
For example if i wanted to stream audio from my pc to my phone. I
looked into the bluetooth api, and it seems that you can stream out of
the phone (as a server) but not to stream in (as a client), or am i
missing something?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] audio streaming from https site

2011-03-11 Thread usman
Hi all
i am developing multimedia player in android which will play
songs using live audio streaming from different sites. but i am unable
to stream songs which are on HTTPS site.
i am solving this issue from 3 days. i could not find any solution's
on net. has anyone some idea to solve this issue.  please help


thanks in advance i will be very grateful to him

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Audio data handling during phone call

2011-02-25 Thread Aditya Singal
Hi,

I was wondering if someone can provide me with the code for setting up
a phone call.

Aditya Singal

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Audio data handling during phone call

2011-02-25 Thread Justin Anderson
Seriously?  What have you done so far?  Have you tried googling for a
tutorial?  Have you taken a look at the Dev Guide at all?

http://lmgtfy.com/?q=android+programmatic+phone+call+tutorial

When I did this there was a result about six links from the top that had
everything you need...

On Fri, Feb 25, 2011 at 10:44 AM, Aditya Singal
adityasingal...@gmail.comwrote:

 Hi,

 I was wondering if someone can provide me with the code for setting up
 a phone call.

 Aditya Singal

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Audio (a2dp) route on nokia bluetooth headset a2dp supported

2011-02-11 Thread amtandroid
Hello sir my question is how can we route audio on nokia bluetooth
headset which is a2dp supported, when i use setBluetoothA2dpOn(true);
and then i check isBluetoothA2dpOn() it returns false, but my
bluetooth headset is a2dp supported and when i do manually(by going on
setting ) then it is done, but how can i do with my application please
any one have idea then please give me replay

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] audio record emulator : setAudioSource failed

2010-12-06 Thread Alkis
hi all,

I am new in android apps development but a - quite-  experienced java
developer.
first of all apologies if this is not the correct place to post...

I am facing some difficulties with the emulator and hope for some
help...

I want to record audio from the microphone. I have set the audio
recording hardware property and specified an sd card image file when
constructing my avd ( ver 2.2) but I get an annoying setAudioSource
failed exception- error when trying to set the AudioSource
value( either to .MIC or .DEFAULT )

I work with eclipse 3.5 (Galileo) on a win 7 computer and my
microphone has been tested and works fine
The application compiles, but when I run it on the emulator it
produces an exception...
The code is (commonly found in the web) the following and I get the
error in the second line

MediaRecorder recorder = new MediaRecorder();
recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
recorder.setOutputFile(path);
recorder.prepare();
recorder.start();

Any ideas?

thank you in advance

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Audio triggered by database change?

2010-12-06 Thread RichardP
Hi all,

I apologize if this is not the right place to place this question, but
have a question regarding the playing of a sound file from a change in
a database entry.

I would like to have a sound file play whenever data changes in a
mysql database. I can do the php part where it detects the changes
from the database, but how do I then get my app to detect that change
and play a sound file that is within the app?

Any ideas?

Thanks!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Audio triggered by database change?

2010-12-06 Thread Miguel Morales
You'll probably want some sort of PUSH notification.  If you are
targeting 2.0+ you might want to take a look at
http://code.google.com/android/c2dm/index.html.
If you're targeting anything before that you'll have to roll your own.
 Probably using a service that either polls the server, or which keeps
a socket connection open to your server and listens for any messages.
AFIK, this shouldn't waste battery because the radio is only turned
on/active when there is data present.

On Sat, Dec 4, 2010 at 6:15 AM, RichardP rperr...@parishepiscopal.org wrote:
 Hi all,

 I apologize if this is not the right place to place this question, but
 have a question regarding the playing of a sound file from a change in
 a database entry.

 I would like to have a sound file play whenever data changes in a
 mysql database. I can do the php part where it detects the changes
 from the database, but how do I then get my app to detect that change
 and play a sound file that is within the app?

 Any ideas?

 Thanks!

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en



-- 
~ Jeremiah:9:23-24
Android 2D MMORPG: http://developingthedream.blogspot.com/,
http://www.youtube.com/user/revoltingx

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Audio corruption during screen is off

2010-11-18 Thread Anzi
Hi,

Sometimes I am getting corrupted audio with Audiorecord class while
screen is off (When the proximity sensor used, or after idle screen
timeout).

Help me to solve this issue if anyone is aware this issue.

Regards,
Anzi

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] audio buffer problem in cupcake

2010-10-27 Thread B U J J I
hi all,
i have ported gstreamer to cupcake and when i am playing an mp3 file i am
getting breaks in audio.

and my logact
is like this

W/AudioFlinger( 25): write blocked for 48 msecs
W/AudioTrack( 25): obtainBuffer timed out (is the CPU pegged?)
user=0001c100,
server=0001c000
W/AudioTrack( 25): *** SERIOUS WARNING *** obtainBuffer() timed out but
didn't
need to be locked. We recovered, but this shouldn't happen (user=0001c100,
serv
er=0001c001)
W/AudioFlinger( 25): write blocked for 46 msecs
W/AudioFlinger( 25): write blocked for 50 msecs
W/AudioFlinger( 25): write blocked for 52 msecs
W/AudioFlinger( 25): write blocked for 51 msecs
W/AudioFlinger( 25): write blocked for 47 msecs


Can someone help me to solve this ...


Thanks,
Bujji

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Audio in a call

2010-10-09 Thread mohammad Rukab
I want to run audio in call duration, which hear from both sides, is there
any way to do this ???

please help me

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Audio in a call

2010-10-09 Thread Mark Murphy
On Sat, Oct 9, 2010 at 8:02 PM, mohammad Rukab mohammad.ru...@gmail.com wrote:
 I want to run audio in call duration, which hear from both sides, is there
 any way to do this ???

Not really. My understanding is that if the device is in speakerphone
mode, you can mux in audio that will be heard through the speaker and
will get picked up by the microphone. However, there is no real access
to the in-call audio at this time.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
Available!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Audio Record problem (urgent)

2010-09-20 Thread melo
Hi all
I'm an android starter
I used MediaRecorder and MediaPlayer to record voice via mic before
This time,I try AudioRecord and  AudioTrack to record voice
But when I try to start, it's forced to be shut down
I've no idea where is wrong?
here are my code ~
Could any one tell me why?
TKS in advance :)

public class audioRecorderTest2 extends Activity
{

boolean isRecording = true;

private static final String Tag = audioRecorder;
private static final boolean log = true;

Button recordButton;
Button stopButton;

OnClickListener record_listener = null;
OnClickListener stop_listener = null;

int frequency = 8000;
int channelConfiguration = AudioFormat.CHANNEL_CONFIGURATION_MONO;
int audioEncoding = AudioFormat.ENCODING_PCM_16BIT;

protected static final int MENU_ABOUT = Menu.FIRST;
protected static final int MENU_Quit = Menu.FIRST + 1;

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
initResourceRefs();

setTitle(Audio recorder test...);

record_listener = new OnClickListener()
{
@Override
public void onClick(View arg0)
{
AudioManager am =
(AudioManager)getSystemService(Context.AUDIO_SERVICE);

//int actualBufferSize = 4096*8;

int bufferSize =
AudioTrack.getMinBufferSize(frequency,channelConfiguration,audioEncoding);

int actualBufferSize = bufferSize;//4096*8

AudioTrack audioTrack = new
AudioTrack(AudioManager.STREAM_MUSIC,
   
frequency,
   
channelConfiguration,
   audioEncoding,
   actualBufferSize,

AudioTrack.MODE_STREAM);

byte[] buffer = new byte[actualBufferSize];

AudioRecord audioRecord = new
AudioRecord(MediaRecorder.AudioSource.MIC,
  
frequency,
  
channelConfiguration,
  
audioEncoding,
  
actualBufferSize);

am.setRouting(AudioManager.MODE_NORMAL,
  AudioManager.ROUTE_EARPIECE,
  AudioManager.ROUTE_ALL);

am.setSpeakerphoneOn(true);
am.setMicrophoneMute(false);

Log.d(Tag,Is speakerphone on? :  + 
am.isSpeakerphoneOn());

audioTrack.setPlaybackRate(frequency);
audioRecord.startRecording();
audioTrack.play();

int frameSize = bufferSize;//320

while(isRecording == true)
{
  try{
int bufferReadResult = audioRecord.read(buffer,
0,frameSize);

if(bufferReadResult == 
AudioRecord.ERROR_INVALID_OPERATION)

if(log)Log.d(Tag,record.read:ERROR_INVALID_OPERATION
returned);

else if(bufferReadResult == 
AudioRecord.ERROR_BAD_VALUE)
if(log)Log.d(Tag,record.read:ERROR_BAD_VALUE
returned);

else if(bufferReadResult != frameSize)
if(log)Log.d(Tag,record.read:Requested 
 + frameSize +
 bytes but read + 
bufferReadResult + bytes);

else audioTrack.write(buffer,0,buffer.length);
  }catch(Exception e)
  {if(log)Log.e(Tag,ERROR:  + e.toString());}
}

audioRecord.stop();
audioTrack.stop();
audioRecord.release();
audioTrack.release();
}
};//record_listener

stop_listener = new OnClickListener()
{
@Override
public void onClick(View arg0)
{
isRecording = false;
}
};//stop_listener

   setListeners();
}//onCreate

private void initResourceRefs()//初始化
{
recordButton = 

[android-developers] Audio record from Bluetooth headset over froyo

2010-09-07 Thread jaeyoun
Hi all

I am developing a voice recorder and voice recognition application
based on Bluetooth SCO channel.
At API level 8, It looks there is a API to open SCO channel, which is
startBluetoothSco ().
It means it is possible to create SCO channel by application?

If yes, how to access voice data from SCO channel to record or
voice_recognize it? is it same way to access voice data from
microphone?

Need help

Thank you

Jaeyoun

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Audio Track play music problem

2010-09-06 Thread melo
Hi all
I'm an android starter
I tused AudioTrack to play music
But it just tell me filenotfoundexeception
I try to play mp3 wav ogg (all in raw dir)
I've no idea where is wrong?
here are my code ~
Could any one tell me why?
TKS in advance :)

public class mainActivity extends Activity
{
private static final String Tag = audioRecorder;
private static final boolean log = true;

AudioTrack track = null;

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

//if(AudioTrack.MODE_STATIC != mode  AudioTrack.MODE_STREAM !
= mode)
//throw new InvalidParameterException();

//String audioFilePath = R.raw.music;
long fileSize = 0;
long bytesWritten = 0;
int bytesRead = 0;
int bufferSize = 0;
byte[] buffer;
//AudioTrack track = null;
int sampleRateHz = 8000;//22050
int audioFormat = AudioFormat.CHANNEL_CONFIGURATION_MONO;
//int audioFormat = AudioFormat.CHANNEL_CONFIGURATION_STEREO;
//int audioEncodingFormat= MediaRecorder.AudioEncoder.AMR_NB;
int audioEncodingFormat= AudioFormat.ENCODING_PCM_16BIT;
//int audioEncodingFormat= AudioFormat.ENCODING_PCM_8BIT;
//int mode = AudioTrack.MODE_STATIC;
int mode = AudioTrack.MODE_STREAM;

File audioFile = new File(R.raw.test.ogg);
fileSize = audioFile.length();

if(log)Log.d(Tag,Buffer size(+ mode +));
if(AudioTrack.MODE_STREAM == mode)
  bufferSize =
AudioTrack.getMinBufferSize(sampleRateHz,audioFormat,audioEncodingFormat);
else //AudioTrack.MODE_STATIC
  bufferSize = (int)fileSize;

buffer = new byte[(int)bufferSize];

if(log)Log.d(Tag,track setting);
track = new
AudioTrack(AudioManager.STREAM_MUSIC,sampleRateHz,
audioFormat,audioEncodingFormat,
bufferSize,mode);

// in stream mode,
// 1. start track playback
// 2. write data to track

if(AudioTrack.MODE_STREAM == mode)
{
  if(log)Log.d(Tag,MODE_STREAM:track.play());
  track.play();
}
FileInputStream audioStream = null;
try{
audioStream = new FileInputStream(audioFile);//R.raw.music
}catch(FileNotFoundException e) {
e.printStackTrace();
Log.e(Tag,Error: + e.toString());
}

if(log)Log.d(Tag,audioStream read);
while(bytesWritten  fileSize)
{
  try
  {
 bytesRead = audioStream.read(buffer,0,bufferSize);
  }catch(IOException e){
  Log.e(Tag,Error: + e.toString());
   }
   if(log)Log.d(Tag,track write);
   bytesWritten += track.write(buffer,0,bytesRead);
}
// in static mode,
// 1. write data to track
// 2. start track playback

if(AudioTrack.MODE_STATIC == mode)
{
  if(log)Log.d(Tag,MODE_STATIC:track.play());
  track.play();
}

}
}

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Audio internals

2010-08-29 Thread GDroid
Hi all,

I have been using the different Audio API's for sometime now. Yet
there are still somethings I'm not sure of and that are behaving
differently on different handsets.

I failed to find good documentation on the relations between the
following:
1. AudioManager Mode  - which I can change using setMode.
2. AudioManager setSpeakerPhoneOn -  Used to direct output to ear-
piece or loud speaker.
3.  AudioTrack stream  - Initialize in the constructor.
4. AudioRecord AudioSource - Initialize in the constructor.

All these different classes effect each other when used at the same
time. The documentation is not sufficient as most of the time it only
states the obvious with no real detail.

Can anyone point to more detailed documentation?

Thanks.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] audio and video application in android

2010-07-05 Thread aswini
hi,

i have run the media appllication in android emulator,
audio and video file is not displaying in android emulator.

video view source code is given below


/*
 * Copyright (C) 2009 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the License);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.example.android.apis.media;

import com.example.android.apis.R;
import android.app.Activity;
import android.os.Bundle;
import android.widget.MediaController;
import android.widget.Toast;
import android.widget.VideoView;

public class VideoViewDemo extends Activity {

/**
 * TODO: Set the path variable to a streaming video URL or a local
media
 * file path.
 */


private String path = C:\'Documents and Settings\'ASWINI\'.android
\'avd\'singam.mkv;
private VideoView mVideoView;

@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.videoview);
mVideoView = (VideoView) findViewById(R.id.surface_view);

if (path == ) {
// Tell the user to provide a media file URL/path.
Toast.makeText(
VideoViewDemo.this,
Please edit VideoViewDemo Activity, and set path
+  variable to your media file URL/path,
Toast.LENGTH_LONG).show();

} else {

/*
 * Alternatively,for streaming media you can use
 * mVideoView.setVideoURI(Uri.parse(URLstring));
 */
mVideoView.setVideoPath(path);
mVideoView.setMediaController(new MediaController(this));
mVideoView.requestFocus();

}
}
}

kindly suggest me how to give the local path in the android
application. thanks in advance

thanks  regards
aswini

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Audio

2010-06-30 Thread Shard
Hi,

Has anyone gotten audio routing to work succesfully on eclair?
SetRouting and a number of functions don't work anymore.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Audio

2010-06-30 Thread y 00o00o0o0o000o00o0o0o
Hi,

I checked the reference guide, and it says that setRouting() is a
deprecated method, developers should call setSpeakerphoneOn() or
setBluetoothScoOn instead.

http://developer.android.com/reference/android/media/AudioManager.html#setRouting(int,
int, int)

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Audio Output pending ?

2010-06-29 Thread mac-systems
Hello,

i have a Alarm which invoke a BroadcastReciever. This
BroadcastReciever enqueues an Task into my Service. The Task get
executed. On a failure i that Task i play a Sound (mostly for me at
the moment so i can check via aLogcat to see the stacktrace).

If the Phone (Nexus One) is sleeping and the Alarm gets on i have the
feeling that the Audio will not played. When i touch my Phone later
(in the morning) i hear all the Audio Failure Feedback. It that
correct behaviour ?

My Audio get Played with this Code:


player = new MediaPlayer();
player.setLooping(false);
player.setOnCompletionListener(this);
...
...
AssetFileDescriptor afd = null;
try
{
afd = 
getContext().getResources().openRawResourceFd(_resourceID);
player.setDataSource(afd.getFileDescriptor(),
afd.getStartOffset(), afd.getLength());
player.setVolume(VOLUME, VOLUME);
player.prepare();
player.start();
}
...



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Audio plugin.

2010-06-21 Thread dmoti
I'm developing an Audio plugin for the android platform.
The plugin suppose to process all audio from the device.
I've already implemented an alsa plugin which work with android too,
but I must change alsa configuration files and install a dynamic link
library.

My question is: is it possible to create an OpenCore plugin that will
do the same?
Is all audio play in an android platform must go through OpenCore?
If so, can I create and build an application that will work (after
compilation of course)
on any android platform ?

thanks,
-md

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Audio focus in 1.5 and 1.6

2010-06-14 Thread ls02
I need to catch event when another app starts playing audio while my
app is also playing audio. My understanding that
AudioManager.OnAudioFocusChangeListener interface does exactly what I
need. However it is not available on Android 1.5. How do I catch this
event in 1.5? Is there any broadcast event or something else I can use?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Audio file list

2010-05-24 Thread Carl H
I need to acquire my audio file names in my raw folder.
fileList() of Context class doesn't seem to work. It returns null.

private void makeAudioList(){
String[] audiofiles = this.fileList();
:
:

It tried placing files in the asset folder as well but still the
return is null.

I'm going to create a test application to test a list of audio files
in my res/raw folder.

I'm open in playing from the asset folder but I haven't tried playing
my audio files from there.

I hope somebody could help. m(__)m

Thanks!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] audio player writing to AudioTrack

2010-05-12 Thread Jeffrey Palm
I've implemented an audio player that does decoding and decryption, so
writes to an AudioTrack object.  The decoding and decryption is done
in native code.  On the more powerful phones everything works fine,
but on the lower-power (e.g. HTC my touch) phones when I switch
activities the CPU becomes completely pegged and the audio becomes
crackly.  The first change was to keep the decoding and writing to the
AudioTrack entirely in native code, which seemed to help a little.
But, the audio still was bad, so, I re-factored out the portion of the
audio player class that is responsible for doing the actual playback
-- the rest of this class provides access to the meta data in the
file, which is in proprietary format -- and am running this as a
remote service.  The runs fine on the more powerful phones, but *only*
runs fine on the lower-power phones if I do the following:
 - start up the application
 - switch to another application
 - switch back to the application
 - start the audio player
Could anyone guess what switching to the other application does?  The
CPU usage graphs look the same for both the app and player processes
when doing this.

Thanks.
Jeff

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Audio input from Bluetooth

2010-05-05 Thread Olivier Guilyardi
Hi,

if I understand correctly, getting audio input from a Bluetooth mic/headset,
using say AudioRecord, is not supported. Is this right?

--
  Olivier

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Audio in the RAW Folder is not able to play....

2010-04-28 Thread arberb
At the moment im working on an application which uses audio files and
the issue is when ever my audio file gets called it gives me this
error:

20:51:12.061916 ERROR   AndroidRuntime  Uncaught handler:
thread main
exiting due to uncaught exception
20:51:12.092916 ERROR   AndroidRuntime
java.lang.RuntimeException:
Unable to start activity ComponentInfo{org.me.zx/
org.me.zx.MainActivity}: android.content.res.Resources
$NotFoundException: File res/raw/a.ogg from drawable resource ID
#0x7f04
20:51:12.092916 ERROR   AndroidRuntime  at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2268)
20:51:12.092916 ERROR   AndroidRuntime  at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2284)
20:51:12.092916 ERROR   AndroidRuntime  at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
20:51:12.092916 ERROR   AndroidRuntime  at
android.app.ActivityThread
$H.handleMessage(ActivityThread.java:1692)
20:51:12.092916 ERROR   AndroidRuntime  at
android.os.Handler.dispatchMessage(Handler.java:99)
20:51:12.092916 ERROR   AndroidRuntime  at
android.os.Looper.loop(Looper.java:123)
20:51:12.092916 ERROR   AndroidRuntime  at
android.app.ActivityThread.main(ActivityThread.java:3948)
20:51:12.092916 ERROR   AndroidRuntime  at
java.lang.reflect.Method.invokeNative(Native Method)
20:51:12.092916 ERROR   AndroidRuntime  at
java.lang.reflect.Method.invoke(Method.java:521)
20:51:12.092916 ERROR   AndroidRuntime  at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:782)
20:51:12.092916 ERROR   AndroidRuntime  at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
20:51:12.092916 ERROR   AndroidRuntime  at
dalvik.system.NativeStart.main(Native Method)
20:51:12.092916 ERROR   AndroidRuntime  Caused by:
android.content.res.Resources$NotFoundException: File res/raw/a.ogg
from drawable resource ID #0x7f04
20:51:12.092916 ERROR   AndroidRuntime  at
android.content.res.Resources.openRawResourceFd(Resources.java:814)
20:51:12.092916 ERROR   AndroidRuntime  at
android.media.SoundPool.load(SoundPool.java:172)
20:51:12.092916 ERROR   AndroidRuntime  at
org.me.zx.SoundManager.addSound(SoundManager.java:27)
20:51:12.092916 ERROR   AndroidRuntime  at
org.me.zx.MainActivity.onCreate(MainActivity.java:22)
20:51:12.092916 ERROR   AndroidRuntime  at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1123)
20:51:12.092916 ERROR   AndroidRuntime  at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2231)
20:51:12.092916 ERROR   AndroidRuntime  ... 11 more
20:51:12.092916 ERROR   AndroidRuntime  Caused by:
java.io.FileNotFoundException: This file can not be opened as a file
descriptor; it is probably compressed
20:51:12.092916 ERROR   AndroidRuntime  at
android.content.res.AssetManager.openNonAssetFdNative(Native Method)
20:51:12.092916 ERROR   AndroidRuntime  at
android.content.res.AssetManager.openNonAssetFd(AssetManager.java:412)
20:51:12.092916 ERROR   AndroidRuntime  at
android.content.res.Resources.openRawResourceFd(Resources.java:811)
20:51:12.092916 ERROR   AndroidRuntime  ... 16 more

This is what I have tried:
-Using MediaPlayer
-Using Audio Player
-Trying MP3 files, OGG, WAV Files
-Using eclispe to compile instead of netbeans
-Deleting my raw folder and adding the files again
-Deleting my R.java file

The file is only 2kb mp3 and 30kb .ogg and 130kb wav

HERES A SCREENSHOT OF MY CODE + PROOF THERES AN a.ogg file:
http://i43.tinypic.com/jpexdz.png

Does anyone have any suggestions on how do I fix this?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Audio stuttering when using AudioTrack.

2010-04-14 Thread Jesper Hansen
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 :)

This is a small test function that kinda emulates what I'm doing, and also
have the same stuttering problem:
(full test project at http://github.com/jhansen/android_test_audio_stutter )

 private void play()
  {
if(m_thread == null)
{
  m_thread = new Thread(new Runnable()
  {
public void run()
{
  m_wakeLock.acquire();
  Process.setThreadPriority(Process.THREAD_PRIORITY_AUDIO);

  int minBufferSize = AudioTrack.getMinBufferSize(44100,
AudioFormat.ENCODING_PCM_16BIT, AudioFormat.CHANNEL_CONFIGURATION_MONO);
  AudioTrack audio = new AudioTrack(AudioManager.STREAM_MUSIC,
44100, AudioFormat.CHANNEL_CONFIGURATION_MONO ,
AudioFormat.ENCODING_PCM_16BIT, minBufferSize*4, AudioTrack.MODE_STREAM);
  audio.play();

  // generate sinus tone
  short[] audioBuffer = new short[1024];
  for(int i=0; iaudioBuffer.length; i++)
audioBuffer[i] =
(short)(Math.sin(i*Math.PI/audioBuffer.length*64)*32765.0f);

  long sleepDuration = audioBuffer.length*10l/44100/3;

  // find out how many cyces to waste to spend around 1/3 of the
total avilable time between AudioTrack writes
  // to increase the change of getting at least one uninterrupted
run, run the profile a few times:
  int loopsPerBuffer = 0;
  for(int j=0; j10; j++)
  {
long profileStart = System.nanoTime();
for(int i=0; i1000; i++)
  m_dummy += i; // to prevent the compiler from removing the
loop
long profileDuration = System.nanoTime()-profileStart;
if(loopsPerBuffer==0 ||
sleepDuration/profileDurationloopsPerBuffer)
  loopsPerBuffer = (int)(sleepDuration/profileDuration);
  }
  Log.v(StutterTest, loopsPerBuffer:+loopsPerBuffer);

  while(!Thread.interrupted())
  {
// to simulate expensive audio processing, burn about 1/3 of the
cycles between writes:
for(int j=0; jloopsPerBuffer; j++)
{
  for(int i=0; i1000; i++)
m_dummy += i;
}

audio.write(audioBuffer, 0, audioBuffer.length);
  }

  audio.stop();
  audio.release();

  m_wakeLock.release();
}
  });
  m_thread.start();
}
  }

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe, reply using remove me as the subject.


[android-developers] audio equalizer support

2010-04-13 Thread kalit t
Hi guys

I am new bie to android .Can you please let me know the extent of  equalizer
support for audio the android offers.

Could you point out equalizer sdk apis ?

Thanks A Lot

BRs
Kalit

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe, reply using remove me as the subject.


[android-developers] Audio Mixing

2010-04-12 Thread k_day
Despite everything I have read about the difficulty of making low
latency audio apps in Android, I am giving it a shot.  To start, I
loaded each note in an octave into a SoundPool, and then looped
through each note that was to be played on that beat and called
play().  This didn't even come close to being accurate enough for me,
and got especially bad if a lot of notes were being played at once.

From what I read, the only way to do something like this is to mix the
audio yourself, though I am not entirely sure how to go about this.
My initial thought is that for each beat, I could precompute the sound
the sound that is to be played (i.e., combine the wav's), and then
pass that stream to an AudioTrack when it is time to be played.

Are there any good examples out there for how to mix audio like this,
or libraries I could use to do this for me?  How have coders of other
music apps dealt with this?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe, reply using remove me as the subject.


  1   2   >