Android :: Playing Multiple Audio Files

Oct 1, 2010

I think I should know this, but my mind has gone blank. I'm making an app that has a few hundred small sound files and I want it to play a certain file dependent on a String I pass to the function. Where I hit the brick wall is getting the resId of the sound file.

Android :: Playing multiple audio files


Android :: Support Receiver Mode For Playing Audio Files?

Nov 16, 2010

I have a requirement where I need to play an audio file in receiver mode(earpiece).I am not sure whether higher versions of Android SDK supports this receiver mode.I went through some links which said about 1.5/1.6 having changes in these Audio APIs and hence not sure.

View 1 Replies View Related

Android :: Bad Sound Quality When Recording / Playing Audio Files

Oct 16, 2010

Hey, I have a problem with android programing when I try to record and then play the file that was just recored. I can both record and play the sound but the quality stinks. Its not just bad is really hard to listen to and sound abit like its a computer generated voice. I use the andriod SDK-emulator. The code that sets up the recording looks like this;

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

And the code playing the file later looks like this;
MediaPlayer mp = new MediaPlayer(); mp.reset();
mp.setDataSource(path); mp.prepare(); mp.start();
I don't know what part that makes the audio file sound really bad or if its just the emulator that makes it bad and that it would work on a real phone.

View 2 Replies View Related

Android : Handle Runtime Exception On Playing Audio Files?

Mar 15, 2010

I have a button that plays an audio file on its click listener. If the button is clicked again and again while the audio file is being played then the app crashes. What's the solution?

Here is some code for reference...

View 1 Replies View Related

HTC EVO 4G : Audio From Mp4 Video Files Not Playing

Nov 23, 2010

Ok so I see a lot of people saying they are having problems with video playback when importing from their SD Card but Im having the opposite problem.

I just switched over from the Metro PCS Samsung Code which is a Windows 6 phone to EVO and I put my SD Card in my EVO. All my music files play and the mp4 video files play but the audio from the mp4 video files dont. Does anyone have advice on how to fix this?

View 9 Replies View Related

Motorola :: Android Player To Recognize Audio Tags On Lossless Audio Files?

May 23, 2010

Does anyone know if there is a way for either meridian or the regular android player to recognize audio tags on lossless audio files?

View 1 Replies View Related

Android :: Combine Only One Audio File From Two Audio Files

Oct 2, 2010

I want combine two audio files. (A audio file + B audio file = AB audio file)So, my search result is:

1. useing an AudioTrack.

2. decode PCM from audio file.

3. combine PCM.

This is currect? It there another way?

View 1 Replies View Related

Android :: Determining Audio Format Of Audio Files

May 8, 2010

Is there a way to determine the audio format of an audio file in Android? On normal java I do it like this:

File file= new File(...);
AudioInputStream stream = AudioSystem.getAudioInputStream(file);
AudioFormat format= stream.getFormat();

View 2 Replies View Related

Android :: Directory To Store Files Generated By App (audio, Video Files Or Images)?

Apr 24, 2009

Can anybody advice what is the recommended directory to store files generated by your application: audio files, video files or some images.

If the phone contains SD card, it is clear that files should be saved there, but if there is no any external storage. where would you recommend to save to?

View 2 Replies View Related

Android :: Retrieve Files Or Audio Files Programmatically From Device

May 11, 2010

I want to know how to get the ringtone,audio files in the device and I want set them as alarm. I am working in the code to set the alarm and I want to know how to retreive audio or ringtones from the device.

View 1 Replies View Related

Android :: Any Audio Is Currently Playing

May 22, 2009

I am using a MediaPlayer instance in order to stream audio files from an Internet location. The audio player is in a separate activity. The user can select from a list of audio files and come to this activity which plays the audio.Now the user might go back to the previous activity (with the list)and select another audio file. In this case, I want to stop any other audio that is playing and start playing the new audio which was selected.Is there any way I can know whether an audio file is playing without having to hold on to the MediaPlayer object?

View 8 Replies View Related

Android :: Playing Of Wma Audio

Apr 9, 2009

the opencore can not play the audio of wma. is it right? and the total time of the wma file can not be find in the trackbrowseractivity. who know why?

View 2 Replies View Related

Android :: Playing Audio From Audio Track In Android

Feb 15, 2010

I want to play music from online mp3 link.I am reading the music data into a stream and trying to play it using audio track.But itz giving only noise.No music i could listen.here buffer is the audio data i am reading into.Same buffer I can play in MediaPlayer,,,But i could not play in audio track.

View 1 Replies View Related

Android :: Audio Stream From Currently Playing Song

Oct 13, 2009

I can capture an audio stream from the mic, but can I capture the currently playing audio stream?

View 2 Replies View Related

Android :: Playing Audio To Bluetooth Headset

Aug 18, 2010

Can we play the audio(amr file) to the Bluetooth headset(no A2DP support) by using android 2.1/2.2 version APIs? If so can you suggest me which API I have to use to do the same?

View 2 Replies View Related

Android :: WebView Playing Audio With Javascript

Sep 25, 2010

I'm trying to very quickly port over an html application with plays sound (with soundmanager2) to a native android app using WebView. From my research, I haven't seen any evidence that sound, such as mp3s, can be played via javascript or any other methods using WebView.

My goal now is to quickly port over the html app and then eventually create a truely native application without using WebViews.

If anyone has been able to successfully implement playing audio using WebViews and Javascript or if this is just not possible at this time.

View 1 Replies View Related

Android :: Playing Audio File During Call

Jan 30, 2009

I want to accept incoming calls and play an audio file for the caller. Is there a possibility of playing an audio file during a phonecall, so that the caller hears a wav- file? It seems to me that nothing is possible during a phone call since release 1.0. Hope this is getting better in the next release.

View 5 Replies View Related

Android :: Mute Currently Playing Audio Applications?

Jan 3, 2010

My self-teaching project is a small application which plays an audio news stream. To be effective, the application really needs to interrupt any currently playing media players (eg: Last FM, Imeem, music player, Spotify etc).I don't know what will be playing or what application will be playing it, but I want to ask them all to pause until I've done. Sounds rather bold, I know, but it must be possible, because when there's an incoming call, that's basically what happens.Can I send a message to all audio players asking them to pause for a moment? Could I spoof an incoming call, just for the time it takes?

View 2 Replies View Related

Android :: Playing An Audio Clip OnClick

Jun 15, 2010

How do I set up an audiofile to play when a user touches an image.Where should I store the audio file and what code should I use to actually play the file?I don't want to bring up the MediaPlayer interface or anything like that.

View 1 Replies View Related

Android :: Playing Html5 Audio In Browser

Jun 18, 2010

I have a javascript that plays audio in the browser, using the html5 <audio> tag. It works fine in the iPhone browser, but not in Android. (Testing using a htc desire with android 2.1.) Anyone know why?By the way, I am also trying to enlarge the audio button that shows up in the iphone (the default one is quite small), with no luck so far - would be grateful for any ideas!

View 3 Replies View Related

Android :: Playing Audio From Resource During Call

Jul 1, 2009

My application is making call from application. Now I want to play some audio on speaker when the caller will receive call. So can some one tell me will i have to play audio in new thread or I will have to do some change? Can someone give me any code snippet?

View 3 Replies View Related

Android :: Media Player Minimizes & Still Playing Audio

Jul 5, 2010

I would like to find an media player that plays videos but when I minimize or multitask to another app I want the videos audio to keep playing like pandora does. The reason for this is bcuz I rip videos off of youtube to mainly listen to the music.

View 2 Replies View Related

Android :: Playing Audio Stream Not Working Using MediaPlayer

Nov 27, 2009

I am trying to make a very simple radio player for Android and I cannot get the audio streaming to work. In my latest attempt it plays for about 1 second and stops for some streams and it doesnt work at all for some other streams. Logcat doesn't give much useful information to me. I am testing on HTC Hero (Android 1.5).

If I hook the completion and buffer events I see the audio gets a complete event but it keeps buffering. Is there anything wrong with the code below? Should I be able to stream the the audio streams below? Is there a complete example somewhere of a working radio streaming?................

View 5 Replies View Related

Android :: Playing Audio Over An Active Phone Call

Aug 7, 2009

Is it possible to play audio over an active phone call, so the other end can hear it?
For example: A and B are talking on the phone. A presses a button that pulls audio from a resource and plays it over the phone call to B.
If so, what libraries should I look into? If not, is this something that could become accessible on rooted phones? (Of course, only other rooted phones would be able to use the application then...)

View 7 Replies View Related

Android :: Playing Audio File On Voice Call

Apr 20, 2010

I want to play an audio file on a voice call as following:
The application initiates a call from device X to device Y
When Y replies application on device X should inject an audio file in the stream of the call so device Y hears this audio file.

View 2 Replies View Related

Android :: Detect Another Application Started Playing Audio

Aug 26, 2010

My music application constantly plays music in the background, however I'd like to be able to detect when another application starts playing audio (such as the YouTube app) so I can pause/mute/stop the audio in my application. This will allow a user to continue browsing the web whilst listening to music, but then if they wish to watch a video at any point, they can do so without audio conflict.

One solution might be to listen for a broadcast which states when an application begins using the AudioManager. Does such an Intent Action exist? Edit: As in the answer provided below, there appears to be a method of detecting the loss of audio focus in 2.2 with AudioManager.OnAudioFocusChangeListener.

View 1 Replies View Related

Android :: Mediaplayer - Stop Button And That Stops Audio From Playing

Nov 18, 2009

I have a activity which is called from another activity as an intent... This activity loads and starts playing a audio file. All is good - that much works. The activity also has a "stop" button and that stops the audio from playing - that is also fine.

But how do I stop the file from playing if the user uses the back button to leave the activity without clicking on the "Stop" button?

View 3 Replies View Related

Android :: Playing Short Audio Clip Has Tick Sound

Dec 14, 2009

I'm using the SoundPool to play a series of small audio clips and am having issues with the audio when it starts. I have the audio attached to a button press. When I press the button mulitple times the tick persists. I was wondering if this was the audio file itself or is there something I need to do differently with the SoundPool other than play simply play the clip. These are .ogg files I created using Audacity. When I play them in my dekstop media player, they sound fine.

View 2 Replies View Related

Android :: Playing Audio Or Video From Remote URL - RTSP/HTTP

Nov 4, 2009

Did anyone try playing audio/video through http/rtsp. I am having a problem with either of the approach.... I am getting an error Command PLAYER_INIT completed with PVMFError I some cases I got Command PLAYER_INIT completed with PVMFErrorContentInvalidForProgressiveDownoload.

Can some one explain what is the problem. The code snippet I am using is given below. Code...

The code works fine when I say mVideoView.setVideoPath("/sdcard/vv.3gp"); but not able to play if I give a rtsp/http urls. In case of http it says PVMFErrorContentInvalid for progressive download.

Can some body tell me what is the problem. Can you please post the code if someone has been successful in playing audio/video through http/rtsp.

View 8 Replies View Related

Android :: Playing Multiple Sounds At Same Time In Application

Apr 13, 2010

I am unable to use the following to code to play multiple sounds/beeps simultaneously. In my onclicklistener I have added
... public void onClick(View v) { mSoundManager.playSound(1);
mSoundManager.playSound(2); } ...
But this plays only one sound at a time, sound with index 1 followed by sound with index 2. How can I play atleast 2 sounds simultaneously using this code whenever there is an onClick() event?

public class SoundManager {
private SoundPool mSoundPool;
private HashMap<Integer, Integer> mSoundPoolMap;
private AudioManager mAudioManager;
private Context mContext;
public SoundManager() {
} public void initSounds(Context theContext) {
mContext = theContext; mSoundPool = new SoundPool(4, AudioManager.STREAM_MUSIC, 0);
mSoundPoolMap = new HashMap<Integer, Integer>();
mAudioManager = (AudioManager)mContext.getSystemService(Context.AUDIO_SERVICE);
} public void addSound(int Index,int SoundID)
{ mSoundPoolMap.put(1, mSoundPool.load(mContext, SoundID, 1));
} public void playSound(int index) {
int streamVolume = mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC);
mSoundPool.play(mSoundPoolMap.get(index), streamVolume, streamVolume, 1, 0, 1f);
} public void playLoopedSound(int index) {
int streamVolume = mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC);
mSoundPool.play(mSoundPoolMap.get(index), streamVolume, streamVolume, 1, -1, 1f);
} }

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved