[android-developers] Sound effects in NumberPicker

2014-04-10 Thread Pankaj Chawla
Hi

Did a quick check and seems like NumberPicker doesnt support sound effects 
associated with scrolling. Is this correct and if yes, is there some way to 
make it happen? Did google and couldnt find anything that could get me started 
and hence the query here.

— 
Thanks
Pankaj

-- 
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] sound cards?

2012-11-16 Thread bob
 

Why do Androids have GPUs but not sound cards?


I believe I've seen significant performance degradation upon adding audio 
to my games.


-- 
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] Sound Making App..

2012-11-08 Thread Hrishikesh Barman
Hello, i am very new to this group and i am currently developing an app 
that is much like the tabla app. Can anyone help me out with it as m not a 
developer , I just want to know how do i put an image and make the image 
sound different when tapped on different places. Hope i will get help from 
you all..   

-- 
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] Sound Making App..

2012-11-08 Thread TreKing
On Wed, Oct 31, 2012 at 2:18 AM, Hrishikesh Barman rishii...@gmail.comwrote:

 I just want to know how do i put an image and make the image sound
 different when tapped on different places.


You could detect where the image was clicked, do some simple math to
determine which sound that corresponds to, and play that. Or you could
split the image up into multiple images that are then put together via
multiple ImageViews aligned correctly. Then just handle each individual
ImageView's click event.

-
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] Sound Sensor?

2012-07-02 Thread Ray da Costa
A helping friends. Anyone know can tell me which API to Identify using and
enjoying the audio input. That is, when the phone receives an audio input
(VOICE) plugin not done, but a person's voice
Tks.
-- 
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

[android-developers] sound play

2012-06-20 Thread Aashish jawla
want to receive incoming call automatically that was I done already now I
want to play my own created sound to my caller rather than android will use
its default mike..

Can is it possible to play our own sound after receiving incoming call?


-- 
-
Thanks  Regards
Er.Aashish Kumar Jawla
(09555865084/09910783591)

-- 
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] sound play

2012-06-20 Thread Daniel Drozdzewski
Use Twilio: http://www.twilio.com/

-- 
Daniel Drozdzewski

-- 
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] sound play

2012-06-20 Thread Aashish jawla
i think it is not sutable for my application i wanna control the sound
stream  of the user means i wanaa play some pre-recorded audio in active
call so that caller hear it
is it possible Daniel or not???


On Wed, Jun 20, 2012 at 7:57 PM, Daniel Drozdzewski 
daniel.drozdzew...@gmail.com wrote:

 Use Twilio: http://www.twilio.com/

 --
 Daniel Drozdzewski

 --
 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




-- 
-
Thanks  Regards
Er.Aashish Kumar Jawla
(09555865084/09910783591)

-- 
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] sound play

2012-06-20 Thread Daniel Drozdzewski
On 20 June 2012 15:47, Aashish jawla aashishja...@gmail.com wrote:
 i think it is not sutable for my application i wanna control the sound
 stream  of the user means i wanaa play some pre-recorded audio in active
 call so that caller hear it
 is it possible Daniel or not???

It is not possible through Android SDK. In Android you can control the
state of the call, but not the call itself.

With something like Twilio (Aculab, http://cloud.aculab.com), you
could play whatever audio file you want to the wire, on which the call
is taking place. In other words you would have access to that
audiostream.









 On Wed, Jun 20, 2012 at 7:57 PM, Daniel Drozdzewski
 daniel.drozdzew...@gmail.com wrote:

 Use Twilio: http://www.twilio.com/

 --
 Daniel Drozdzewski

 --
 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




 --
 -
 Thanks  Regards
 Er.Aashish Kumar Jawla
 (09555865084/09910783591)

 --
 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



-- 
Daniel Drozdzewski

-- 
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] sound

2012-06-05 Thread krishna kumar
explosionId = soundPool.play(explosionId, 1.0f, 1.0f, 1, -1, 1);


All sounds play fine as long as they are not set to looping. When i set
looping  (set as -1) then the sound play one time only then stop  aging
not playing why ...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

[android-developers] sound

2012-05-21 Thread junior ndroid
hey im a beginner in android im using a webview just uploading my
html5 and javascripts but my problem is sound im using jquery sound
but it cant play on android emulator. any 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


Re: [android-developers] Sound problems when trying to play same sound very fast

2012-05-04 Thread Jason Teagle

the point it should, and further sounds twice or even three times at
same time. At fastest speed it sounds three or four times fast at
the start, and then it does not sound anymore.


Have you tried increasing the number of streams, in case you are queuing too 
many occurrences of the same sound and it is dumping older ones because of 
the limit on the number of streams?


If that doesn't seem to help or you already have a high number of streams, 
it might be worth keeping track of the stream IDs you get back and manually 
stopping older ones yourself to ensure there is always room for newer ones 
to play properly. You may simply be overloading the media player with too 
many requests.



--
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] Sound problems when trying to play same sound very fast

2012-05-03 Thread Fran
Hi there,

I am developing a game that among other things uses one gear wheel.
When the wheel rotate, every 15 deegres, it should made a click sound.
So I am using the SoundPool.play for making a tiny click.wav to sound
at those points.

It works fine at slow speed, but when the gear goes faster, it fails.
At some speeds it stops to sound sometimes, often it does not sound at
the point it should, and further sounds twice or even three times at
same time. At fastest speed it sounds three or four times fast at
the start, and then it does not sound anymore.

I am a begginer in Android development, also I have never had similar
problem. Perhaps I need a different aproach by design, and not just
help with Android's framework.

Thanks a lot in advance.

Best regards,

-- 
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] sound recognition and FFT problem

2012-05-02 Thread Mik
Dear all,
I am struggling a lot to get sound recognition working.
Essentially I would like to use the microphone and recognize when a
specific note has been played (as a guitar tuner).

I am trying to use GDX library for FFT: http://code.google.com/p/libgdx/

What is happening is that with the same frequency originated from a
signal generator, I don't get always the same results. And most of all
I get very different results from my ZTE Orange San Francisco versus a
Galaxy mobile (although i suspect the ZTE is the one to blame :-)

This is my code.
private static final int RECORDER_SAMPLERATE = 44100;;
private static final int RECORDER_CHANNELS =
AudioFormat.CHANNEL_CONFIGURATION_MONO;
private static final int RECORDER_AUDIO_ENCODING =
AudioFormat.ENCODING_PCM_16BIT;

When I start the 'record' button I initialise the AudioRecorder and
start listening into a separate thread:
private AudioRecord recorder = null;

recorder = new AudioRecord(MediaRecorder.AudioSource.MIC,
RECORDER_SAMPLERATE, 
RECORDER_CHANNELS,RECORDER_AUDIO_ENCODING,
bufferSize);

and the listening function follows:
int MULTIPLIER = 1; // -- I increase this if I wish to
concatenate input buffers coming from microphone

short[] data = new short[bufferSize];

float[] fft_cpx;
float[] tmpR, tmpI;
float[] new_array = new float[bufferSize*MULTIPLIER];

double[] real = new double[bufferSize*MULTIPLIER];
double[] imag = new double[bufferSize*MULTIPLIER];
double[] mag = new double[bufferSize*MULTIPLIER];

Log.i(TAG, Ready to go, buffer size: +bufferSize);  //--- it is
4096 when using 44Khz, but at each read only 2048 is retreived

fft = new FFT(bufferSize*MULTIPLIER, RECORDER_SAMPLERATE);

long t1, t2, t3, deltaT;

while (isRecording) {
t1 = System.currentTimeMillis();
int index = 0;

for (int j=0; jMULTIPLIER; ++j) {
int n = recorder.read(data, 0, bufferSize);  // 
--
it reads 2048 = n
Log.i(TAG, Data read (j=+j+): +n);

for ( int z=0; zn; ++z) {
new_array[index] = data[z];
++index;
}
}

t2 = System.currentTimeMillis();
deltaT = t2-t1;
Log.i(TAG, Data read in TIME: +deltaT+ (+t1+,+t2+));
Log.i(TAG, Global index: +index);

fft.forward(new_array);
fft_cpx = fft.getSpectrum();

// Find Max and Max position in CPX

tmpR = fft.getRealPart();
tmpI = fft.getImaginaryPart();
arrDet.peakValue = 0;  //arrDet
is a dummy structure where I store peak value and position


for (int i = 0; i  new_array.length; i++) {
real[i] = (double) tmpR[i];
imag[i] = (double) tmpI[i];

mag[i] = Math.sqrt((real[i] * real[i]) + (imag[i] * 
imag[i]));

if ( mag[i]  arrDet.peakValue ) {
arrDet.peakValue = mag[i];
arrDet.position = i;
}
}

int FrequencyN = 0;
if ( new_array.length!= 0 )
FrequencyN = RECORDER_SAMPLERATE * arrDet.position /
new_array.length; //bufferSize;
int FrequencyBS = RECORDER_SAMPLERATE * arrDet.position /
bufferSize;

Log.i(TAG, @ F(N)is: + FrequencyN + \tF (BS)is: +FrequencyBS
+ \tpos: +arrDet.position );

}

Results:
For example, if I get:

INPUT FREQUENCY = 1000
Log: Frequency (N) is 8010
@ 744 // -- position

Or
INPUT FREQUENCY = 1000
Log: Frequency (N) is 3003
@ 279 // -- position

Or
INPUT FREQUENCY = 1000
Log: Frequency (N) is 6007
@ 558 // -- position



QUESTIONS:
1) any idea about what I am doing silly?

2) is it enough to read from the microphone only once? Or should I
rather concatenate buffers?
I am not noticing any more stability to be honest...

thanks for any help!
Mik

-- 
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] sound player

2012-02-17 Thread exax
So, I wanted to create a simple sound player that will just play a
sound when I touch a button. I created it without errors but it
crashes everytime i run it. I got rid of all the extra code and found
that the error is coming from the media player initialization

public MediaPlayer music = MediaPlayer.create
(getApplicationContext(), R.raw.sound_1);

I believe this is due to my lack of understanding context. i need some
help figuring out what context to put into the first parameter.
thanks 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


Re: [android-developers] sound player

2012-02-17 Thread Mark Murphy
On Fri, Feb 17, 2012 at 3:14 PM, exax evan.yeu...@gmail.com wrote:
 So, I wanted to create a simple sound player that will just play a
 sound when I touch a button. I created it without errors but it
 crashes everytime i run it. I got rid of all the extra code and found
 that the error is coming from the media player initialization

 public MediaPlayer music = MediaPlayer.create
 (getApplicationContext(), R.raw.sound_1);

 I believe this is due to my lack of understanding context. i need some
 help figuring out what context to put into the first parameter.

Try:

public MediaPlayer music = MediaPlayer.create(this, R.raw.sound_1);

-- 
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] sound effects for android game application

2011-11-28 Thread John Goche
Hello,

I am making an android game. I wonder whether anyone can suggest
how to go about producing the sound effects including sound track as
well as other sounds for the game.

Thank you for your feedback,

John Goche

-- 
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] sound spectrum analyzer

2011-11-17 Thread Daniel Drozdzewski
On 16 November 2011 11:21, ron simon beachboy2...@googlemail.com wrote:
 Hi Dev. Team,
 I want to create a spectral analyser but I'am new in this field . For
 writing a content from a music file in an array I used this

        try {
            File file = new File(mFileName,
 array_spinner[Getposition()]);
             file.createNewFile();
             InputStream  is = new FileInputStream (file);
             BufferedInputStream     bis = new BufferedInputStream
 (is);
                     DataInputStream         dis = new DataInputStream
 (bis);

                    while (dis.available()  0)
                    {
                        dis.read(buffer,byteOffset,byteCount);

Ron,

How big is your buffer? Where do you manage offset and byte count?

You don't check what values did DataInputStream.read() returned.

You have to do a bit more management in order to read the whole file
into a byte array. Just google for 'reading a whole file in Java' or
better still 'copying files in Java'. That should show you, what needs
doing around buffers, offsets etc.

-- 
Daniel Drozdzewski

-- 
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] sound spectrum analyzer

2011-11-16 Thread ron simon
Hi Dev. Team,
I want to create a spectral analyser but I'am new in this field . For
writing a content from a music file in an array I used this

try {
File file = new File(mFileName,
array_spinner[Getposition()]);
 file.createNewFile();
 InputStream  is = new FileInputStream (file);
 BufferedInputStream bis = new BufferedInputStream
(is);
 DataInputStream dis = new DataInputStream
(bis);

while (dis.available()  0)
{
dis.read(buffer,byteOffset,byteCount);
}
 dis.close();

 //write buffer into a text file

After that I wrote this buffer in a txt file for reading.

Text.setTxtDatei(test,buffer);

The problem is that the content is allways the same for every music
file.So it can not be the buffer of the stream.
So the question is how to get the buffer into the txt file ?

Yours,
Ron


-- 
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] Sound of a streaming on a web is played too fast.

2011-08-04 Thread JYP
Dear android developers.

Goo

First of all, I don't have good english skill.

I have a Android Phone.
And I tried to watch a video stream(?) on a web site.
After done loading, start to play.
But the sound is played too fast.

At frist, I thought that the content has a problem. But another device
worked well.

Please give your help.

Thank you.


-- 

──

PARK JONGYOUNG

e-mail : leftp...@gmail.com

mobile : +821036315864

──

-- 
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] Sound On/Off Button - Muting app sounds Button

2011-03-21 Thread Gabriel
Hey guys,

I see in a lot of games this Button wich you can Mute the app sounds.

I want to put this in my app, but I don't have any clue how to do
that.

1 - It would be the same button to mute and unmute the sounds. Like in
NinJump Game.

2 - It would change the button image. Like Off' when you click it
and Off when you click it again.

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] Sound On/Off Button - Muting app sounds Button

2011-03-21 Thread TreKing
On Mon, Mar 21, 2011 at 12:50 PM, Gabriel gab...@gmail.com wrote:

 I want to put this in my app, but I don't have any clue how to do that.


if (muteButtonPressed())
 turnOffSound();

if (soundIsOn())
 playSounds();

-
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] Sound

2011-02-25 Thread ikerib
hi! I have this code:

private void mostrarDiapositiva(VectorDiapositiva d, int pos) {
if ( pos = d.size() ) {
pos = d.size() - 1;
}
Diapositiva diapo = d.get(pos);

this.setDiapoPosActual(pos);
this.setDiapoActual(diapo);

reiniciarDiapositiva();

mostrarDiapositiva(diapo);
try {
if (diapo.tieneSonido()) {
String sndPath = ZIP_SND_PATH +
diapo.getSonido().getNombre();
InputStream isSonido =
this.getTutorFile().getFile(sndPath);

this.audioPlayer = new StreamingMediaPlayer(this);
this.audioPlayer.startStreaming(isSonido);

}   else if (diapo.tieneVideo()) {
if (!diapo.tieneImagen()) {
String imgPath = ZIP_FONDOS_PATH + fondo_video.png;
cargarImagen(imgPath);
}
}
} catch (Throwable ex) {
Log.e(mostrarDiapositiva, ex.getMessage());

Toast
.makeText(this, Error:  + ex.getMessage(),
Toast.LENGTH_SHORT)
.show();
}


}

private void mostrarDiapositiva(Diapositiva diapo) {

ImageButton bp = (ImageButton) findViewById(R.id.buttonprev);
bp.setImageResource(R.drawable.ic_menu_back);

ImageButton bn = (ImageButton) findViewById(R.id.buttonnext);
bn.setImageResource(R.drawable.ic_menu_forward);

try {

if (diapo.tieneImagen()) {

String imgPath = ZIP_IMG_PATH +
diapo.getImagen().getNombre();

cargarImagen(imgPath);
}

this.animarFade(this.FLIPPER_DIAPOS_NUMLAYOUT);

//if (diapo.tieneSonido()) {
//  String sndPath = ZIP_SND_PATH +
diapo.getSonido().getNombre();
//  InputStream isSonido =
this.getTutorFile().getFile(sndPath);


} catch (Throwable ex) {
Log.e(mostrarDiapositiva, ex.getMessage());

Toast
.makeText(this, Error:  + ex.getMessage(),
Toast.LENGTH_SHORT)
.show();
}

}

and everithing works fine except the sound. When I paint the screen

mostrarDiapositiva(diapo); we have an associated sound for every
slide so if it has sound (if (diapo.tieneSonido())) it´s plays it.

the problem is that the very first time the audio starts after one or
two syllable it starts again.

it´s seems like the audio starts when the slide is being painted and
when it is painted it starts again. There any doevents or somethink
like that?

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] sound

2011-01-24 Thread k@rthink!!!
hi guys

I was creating an app where a sound is played when i click a button. I found
in the developer site that i need to place the audio file in the res/raw
folder...my ide doesnt show any raw folder...i created one in the res folder
and the system is showing an error..can anyone please help me out with this?
karthik gadiraju

-- 
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] sound

2011-01-24 Thread Marcin Orlowski
On 19 January 2011 10:19, k@rthink!!! kartika...@gmail.com wrote:
 hi guys

 I was creating an app where a sound is played when i click a button. I found
 in the developer site that i need to place the audio file in the res/raw
 folder...my ide doesnt show any raw folder...i created one in the res folder
 and the system is showing an error..can anyone please help me out with this?
 karthik gadiraju

If your IDE is Eclipse just do File - Refresh or RMB - Refresh on that project

-- 
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] sound detection

2011-01-20 Thread manas gajare
1. I want to trigger a function when the sound level in the surrounding is
above some threshold level? How can I achieve that?
2. Is there any way to implement java sound api in android?

Manas

-- 
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] Sound merging in android.

2010-12-06 Thread manivel
Hi,

There are four audio file which i recorded through MediaRecorder in
android.
Now i want to merge the recorded file with a single background music.

pls 

-- 
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] Sound in android web view

2010-11-02 Thread nena joy
*My java code is here*

package com.customlistview1;

import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.webkit.WebChromeClient;
public class Image extends Activity
 {
   private WebView webview;
   @Override
public void onCreate(Bundle icicle)
 {
   super.onCreate(icicle);
   setContentView(R.layout.web);
   setupwebwiew();
}
   private void setupwebwiew()
{
webview=(WebView)findViewById(R.id.webkit);
webview.setWebViewClient(new WebViewClient());
webview.setWebChromeClient(new WebChromeClient());
webview.getSettings().setJavaScriptEnabled(true);

webview.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
webview.loadUrl(file:///android_asset/buttonsound2.html);
    webview.loadUrl(file:///android_asset/we.mp3);
   }
 }


I enabled the javascript.
But not play the sound.

-- 
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] Sound loop - with pause in between

2010-09-26 Thread svebee
Hi,

I have String Array with some strings in it [UP,L,R,R...] and I have
some sounds (audio_up.mp3, audio_l.mp3 and so on). I want go through
all the strings in the array and play sounds accordingly with pause in
between (let's say 1 second).

for (int a = 0; a  string_Array_String.length; a++) {
MediaPlayer mp = null;
if 
(string_Array_String[a].equals(UPL)) {
mp = 
MediaPlayer.create(Game.this, R.raw.audio_upl);
} else if 
(string_Array_String[a].equals(UP)) {
mp = 
MediaPlayer.create(Game.this, R.raw.audio_up);
}

try {
mp.prepare();
} catch (IllegalStateException e) {
// TODO Auto-generated catch 
block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch 
block
e.printStackTrace();
}

mp.start();
}

This is OK but loop is faster than sound fields so I get overlaping -
not good.

I tried to put

try
{
Thread.sleep(1000);
}
catch(InterruptedException e)
{
e.printStackTrace();
}

on the end of the loop but only first and second audio file are OK,
the rest are cut too soon.

Solution?

-- 
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] Sound loop - with pause in between

2010-09-26 Thread YuviDroid
Hi,

I've never used the MediaPlayer API, but by reading the docs I see this
method that might be interesting to you: setOnCompletionListener (
MediaPlayer.OnCompletionListenerhttp://developer.android.com/reference/android/media/MediaPlayer.OnCompletionListener.html
 listener)

probably you can simply add and implement this listener, and when the method
gets called you know the current mp3 has finished playing, then you can play
the next (or wait 1 sec and then play..).

Hope it helps!
Yuvi


On Sun, Sep 26, 2010 at 4:59 PM, svebee sven.kapud...@gmail.com wrote:

 Hi,

 I have String Array with some strings in it [UP,L,R,R...] and I have
 some sounds (audio_up.mp3, audio_l.mp3 and so on). I want go through
 all the strings in the array and play sounds accordingly with pause in
 between (let's say 1 second).

 for (int a = 0; a  string_Array_String.length; a++) {
MediaPlayer mp = null;
if
 (string_Array_String[a].equals(UPL)) {
mp =
 MediaPlayer.create(Game.this, R.raw.audio_upl);
} else if
 (string_Array_String[a].equals(UP)) {
mp =
 MediaPlayer.create(Game.this, R.raw.audio_up);
}

try {
mp.prepare();
} catch (IllegalStateException e) {
// TODO Auto-generated catch
 block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch
 block
e.printStackTrace();
}

mp.start();
 }

 This is OK but loop is faster than sound fields so I get overlaping -
 not good.

 I tried to put

try
{
Thread.sleep(1000);
}
catch(InterruptedException e)
{
e.printStackTrace();
}

 on the end of the loop but only first and second audio file are OK,
 the rest are cut too soon.

 Solution?

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
YuviDroid
Check out Launch-X http://android.yuvalsharon.net/launchx.php (a widget to
quickly access your favorite apps and contacts!)
http://android.yuvalsharon.net

-- 
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] Sound levels in games

2010-08-20 Thread Neilz
Anyone any thoughts on this?

On Aug 18, 6:46 pm, Neilz neilhorn...@gmail.com wrote:
 Hi all.

 A common complaint with my app is that the sound is too low. I don't
 know what I can do to improve this.

 - I use SoundPool, and believe I am setting each sound to its maximum
 volume

 - I edit my sound files in Audacity, and use the normalization/
 amplification tools to maximize them to as much as I can before they
 start to cause popping/crackling.

 - They are saved and played back as ogg files.

 I don't know anything else I can do? Any ideas please?

-- 
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] Sound levels in games

2010-08-20 Thread Leigh McRae
 It could be the master volume.  Make sure you let the OS handle the 
master volume using


Activity.setVolumeControlStream( AudioManager.STREAM_MUSIC );



From there what I do is have a relative volume per effect.  The thing 
is that you don't hold the master volume so you need to get it from the 
OS.  I do this.



public float makeVolume( float fRelVolume )
{
AudioManageraudioManager= 
(AudioManager)m_Activity.getSystemService( Context.AUDIO_SERVICE );
int masterVolume = audioManager.getStreamVolume( 
AudioManager.STREAM_MUSIC );

return ((float)masterVolume / 15.0f) * fRelVolume;
}


Leigh

On 8/20/2010 12:06 PM, Neilz wrote:

Anyone any thoughts on this?

On Aug 18, 6:46 pm, Neilzneilhorn...@gmail.com  wrote:

Hi all.

A common complaint with my app is that the sound is too low. I don't
know what I can do to improve this.

- I use SoundPool, and believe I am setting each sound to its maximum
volume

- I edit my sound files in Audacity, and use the normalization/
amplification tools to maximize them to as much as I can before they
start to cause popping/crackling.

- They are saved and played back as ogg files.

I don't know anything else I can do? Any ideas please?


--
Leigh McRae
www.lonedwarfgames.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


[android-developers] Sound levels

2010-08-18 Thread Neilz
Hi all.

A common complaint with my app is that the sound is too low. I don't
know what I can do to improve this.

- I use SoundPool, and believe I am setting each sound to its maximum
volume

- I edit my sound files in Audacity, and use the normalization/
amplification tools to maximize them to as much as I can before they
start to cause popping/crackling.

- They are saved and played back as ogg files.

I don't know anything else I can do? Any ideas please?

-- 
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] Sound board App

2010-05-24 Thread Francisco
Hello,

I am trying to develop and android sound board app. I have everything
set up and it compiles and loads properly on the simulator.

I have a total 14 different sounds to play, 1-7 play fine without a
problem. When i try to play any sound beyond 7, like sound 8 the
applications crashes and closes. The sound files are stored in /raw/.
They are mp3 files.

I have made the call to the media player class to all 14 sounds like
this.

private MediaPlayer mp1 = MediaPlayer.create(this, R.raw.name of file
it should play);

Is there a limit on the MediaPlayer class where I can only call 7
files at a time?

Thanks for any help you can provide.

-- 
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] Sound question

2010-05-14 Thread Justin
Hopefully I can get some advice here on this.  I also think that this
may have been asked before, but I want to get some new
perspective...Anyway

For applications that work like musical keyboards (think simple 8-16
notes for now), what sound tools are best for this type of
application.  I'm thinking that a user could press on a key to make a
sound or press on a different key that has a predefined chord
associated with it.  I've used SoundPool in the past and it works
great in my apps, however I found it to be a bit lagging if you add
more than a handful of simultaneous sounds (ie: a chord).  I'm
currently looking at JetPlayer and it has promise, but I'm finding
that it has some deficiencies of it's own.  AudioTrack seems very raw
and hardcore, but I have no idea where to begin making sounds with it
(at least sounds that sound good) and it seems it might have some
limitations as to how many notes could be played at once.

Does anyone have any general advice in this realm?

Thanks for anything!

Justin

-- 
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] Sound Processing

2010-03-29 Thread Janaka
I want to get the input from the mic. Do some changes then output the
result to the speaker.

What are the classes i should check to achive this?

Is there any sample program?

-- 
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 from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Sound output

2010-03-26 Thread André
Hi,

I'm wondering if there is a way of choosing your sound/audio output
source for a audio file or the text to speech function to ear speaker
instead of the louder back speaker?
Been looking around for it but can't find an answer for it.

André

-- 
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 from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Sound pops clicks using SoundPool on Droid 2.0

2009-12-09 Thread Ian Dunlop
My wave files are 44KHz / 16-bit. They are not looped. Playback always
results in a nasty pop / click right at the end of it. Sounds have
been verified in a sound tool to eliminate any issues with the data.
Sounds playback fine on other devices too.

Has anyone come across issues like this? Are there any possible
solutions?

Cheers,
   Ian Dunlop
   oeFun, Inc.

-- 
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] Sound in games

2009-10-09 Thread yarik...@gmail.com

Hi all!

I have pretty common question:
is there any bug-free way to implement sound effects in a game?

Or we only have unpredictable SoundPool with its horrible bugs?
Or MediaPlayer that can only play one sound at once and which
is not solution for a game at all?

In fact, it is disturbing question for numerous developers right now!
--~--~-~--~~~---~--~~
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] Sound engine performance

2009-10-05 Thread Zuli

Hi,
I am working on an app that uses the SoundPool class to play sounds.
Basically every n milliseconds I need to play up to 16 sounds and I
need this to be as steady as possible.
The best solution I found so far is to use a java.util.Timer and the
scheduleAtFixedRate method (setting also a
THREAD_PRIORITY_URGENT_AUDIO in the TimerTask run method), the result
is pretty good but it is still not perfect and sometimes the
executions get slightly delayed.

Is there some other way I should try to play sounds _exactly_ every n
milliseconds? Different threads, some kind of optimization, stuff like
this?

Thanks,
Zuli

ps: I am using .ogg files and there is not much graphic involved in
the computation.
--~--~-~--~~~---~--~~
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] Sound recording in emulator working but voice recognition is not ?

2009-09-27 Thread Amit

Hi,
I am pulling my hair on this problem from a long time and haven't
found a solution yet. I am running Android demo program - APIDemo
which is available in android source. For my dev I am using ubuntu,
earlier when I used to run SoundRecording example it created a file on
sdcard but there was no recording as such which was done in the file
but now it started working suddenly. I am still not sure why it
happened. But anyways good news is that Microphone is working with
android emulator - as opposed to what I read at many forums that it
does not.

On other hand whenever I am trying to run the voice recognition
application available in same APIDemo its giving me an error -
Recording Parameter not supported: sampelrate 1600, channelcount 1,
samplerate 1. Is it that speech recognition cannot take higher sample
rate and if it cannot what is the sample rate it requires? My
microphone supports only 16000 and higher sample rate.

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] Sound Recording Example does not work

2009-06-08 Thread iuiz

Hi,

I am trying to create an app, that works with the sound, that is
recorded using the mic. I just looked here for first informations:
http://developer.android.com/guide/topics/media/index.html

The Problem ist, that if I try to get the Audio Capture Setup and
Start Example to run, it just wont work. The first error is, that
there is no MediaStore.MediaColumns.TIMESTAMP. Ok, this is not such a
big problem, but indicates, that this is realy deprecated. The bigest
bug is here:

ContentResolver contentResolver = new ContentResolver();

Eclipse tells me the following: cannot instantiate the type
ContentResolver

So, has anyone some simple code for me to record sound data? I don't
need to record it, but I want to be able to work with it in the
memory. So perhaps a sound stream, or something similar.

Thx,
iuiz

--~--~-~--~~~---~--~~
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] Sound interfering with Accelerometer and Orientation sensors?

2009-03-31 Thread iconnary

On my T-Mobile G1 (firmware 1.1, build PLAT-RC33), developing in
SDK1.1r1,  I am experiencing a problem where playing sounds causes the
output of the accelerometer and orientation sensors to fluctuate
wildly. The degree of fluctuation is directly proportional to the
volume of the sound being played.

I am using SensorManager per the documentation and examples :

=  From my implementation of SensorListener
public void init() {
 SensorManager sm = (SensorManager) cx..getSystemService
(Context.SENSOR_SERVICE);
 boolean success = sm.registerListener(this,
  SensorManager.SENSOR_ORIENTATION,
  SensorManager.SENSOR_DELAY_GAME);
 // success is true, i.e. no problems acquiring the sensor
}

public void onSensorChanged(int sensor, float[] values) {
 if (sensor == SensorManager.SENSOR_ORIENTATION) {
  // print/draw/do something with the sensor output in values
[]
 }
}
==

I have tried playing sounds with both SoundPool and MediaPlayer, with
identical results.   When a sample is played at max volume the
Orientation sensor outputs will bounce around as much as +-/30
degrees.   All axes are affected.

I have tested and confirmed this behaviour for SENSOR_ACCELEROMETER,
SENSOR_ORIENTATION, and SENSOR_ORIENTATION_RAW.  Other sensors may
also be impacted, but I haven't tested them.

I have also tested with all of the available sensor resolutions --
SENSOR_DELAY_FASTEST through SENSOR_DELAY_UI.   All result in the same
behavior.

On a random guess I tried muting the microphone with
AudioManager.setMicrophoneMute(true) -- same results.

I thought to try testing this in the Android emulator to see if it
might be hardware-related, but unfortunately there is currently no
accelerometer/orientation sensor support in the emulator.

Is this a known problem?  Or am I doing something wrong here?

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] Sound interfering with Accelerometer and Orientation sensors

2009-03-31 Thread iconnary

On my T-Mobile G1 (firmware 1.1, build PLAT-RC33), developing in
SDK1.1r1,  I am experiencing a problem where playing sounds causes the
output of the accelerometer and orientation sensors to fluctuate
wildly. The degree of fluctuation is directly proportional to the
volume of the sound being played.

I am using SensorManager per the documentation and examples :

=  From my implementation of SensorListener
public void init() {
 SensorManager sm = (SensorManager) cx..getSystemService
(Context.SENSOR_SERVICE);
 boolean success = sm.registerListener(this,
  SensorManager.SENSOR_ORIENTATION,
  SensorManager.SENSOR_DELAY_GAME);
 // success is true, i.e. no problems acquiring the sensor
}

public void onSensorChanged(int sensor, float[] values) {
 if (sensor == SensorManager.SENSOR_ORIENTATION) {
  // print/draw/do something with the sensor output in values
[]
 }
}
==

I have tried playing sounds with both SoundPool and MediaPlayer, with
identical results.   When a sample is played at max volume the
Orientation sensor outputs will bounce around as much as +-/30
degrees.   All axes are affected.

I have tested and confirmed this behaviour for SENSOR_ACCELEROMETER,
SENSOR_ORIENTATION, and SENSOR_ORIENTATION_RAW.  Other sensors may
also be impacted, but I haven't tested them.

I have also tested with all of the available sensor resolutions --
SENSOR_DELAY_FASTEST through SENSOR_DELAY_UI.   All result in the same
behavior.

On a random guess I tried muting the microphone with
AudioManager.setMicrophoneMute(true) -- same results.

I thought to try testing this in the Android emulator to see if it
might be hardware-related, but unfortunately there is currently no
accelerometer/orientation sensor support in the emulator.

Is this a known problem?  Or am I doing something wrong here?

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] sound effect using SoundPool

2009-02-12 Thread djp

Hi,

there seems to be a dead-lock problem when using sound effects with
SoundPool. I was hoping the the problem would be fixed in the new
firmware update, but unfortunately, it was not. The application still
locks up after couple of minutes when playing sound effects using
SoundPool. My application is a game playing a background music
scenario with multiple simultaneous sound effects.

Any word from devs as when we can expect stable SoundPool would be
very welcome.

Best
David

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---