Android :: Noisy Music Sound While Playing (MediaPlayer)?

Jul 19, 2010

is there a way to find the 'noise produced' by a currently playing sound (MediaPlayer) -Like in many music editor software you import a song and it does a graphical layout of the song -like a graph with it higher up at louder bits. Hard to explain. But there must be a way to do this on android...

Android :: noisy music sound while playing (MediaPlayer)?


Android :: MediaPlayer Not Playing Music Track / Why Is This?

Aug 9, 2010

I have followed the steps to create my media player object but I cant understand why it is not playing the music track. I used the following code...

but no sound is playing through the emulator, and furthermore when i check the method mp.isPlaying() it returns false. What have I missed?

View 2 Replies View Related

Android :: Way To Stop Playing Music / Sound Of Other App?

Jan 28, 2010

I want to know that can we stop playing sound or music of other application which actually plays the music from our application? Something like get the handle of MusicPlayer or AudioManager in our application and using this handle stop the currently playing sound.

View 9 Replies View Related

General :: No Sound When Playing Games Or Music

Jun 9, 2013

I flashed too many roms for fix it {custom and offical}, my problem is my phone don't have sound when play any game or music but when my phone ringing its have sound.

View 1 Replies View Related

Android :: Playing Default Ringtone With SoundPool Or MediaPlayer

Oct 31, 2010

How do I get the default ringtone to play? I've tried using SoundPool (preferred method) and MediaPlayer to play it but I'm getting nowhere. I've done so many dumb things, I'll just include the last fail. In the following snippet: String ringtone = Settings.System.DEFAULT_RINGTONE_URI.getPath(); SoundPool ringPhone = new SoundPool(1, AudioManager.STREAM_RING, 0); int soundID = ringPhone.load Settings.System.DEFAULT_RINGTONE_URI.getPath(), 1); ringPhone.play(soundID, 0.99f, 0.99f, 1, 0, 1.0f);

loads but plays nothing. When I display Settings.System.DEFAULT_RINGTONE_URI.getPath(), it's returning /system/ ringtone

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 :: MediaPlayer Stops Playing When Streaming Over 3G On The Nexus One

Apr 23, 2010

I am maintaining a streaming music player, and I'm running into a similar problem as http://www.last.fm/group/Last.fm+Android/forum/114391/_/593575

My player stop after roughly 1-2 minutes, and there are no log messages except for "I/AudioHardwareQSD( 52): AudioHardware pcm playback is going to standby" just after the playback stops.

This happens when I run it on the Nexus One over 3G. It does not happen over Wifi, and it does not happen on my HTC Hero with android 1.5 over 3G.

Do you guys have any hints on how to debug this? Is it e.g. possible to monitor the memory available to the media player object?

View 5 Replies View Related

Android :: Mp3 Files <=0.34 Secs Not Playing On Droid X Using MediaPlayer

Jul 16, 2010

Getting reports that mp3 files <= 0.34 secs in length, are not played (or, at least, inaudible) on the Droid X. Works fine on other devices I've tried (e.g. Nexus One, Hero, G1)

All files longer than 0.34 secs are working fine. I've tested this with about 100 files (mixture of short and long) and the correlation is 100%.

View 4 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 :: Need To Use MediaPlayer - Multiple Sound Files

Mar 10, 2010

I need to use MediaPlayer to play some sounds, as they were too large in size for the SoundPool class.

The constructor takes a single sound file. I have, potentially, around 20 files that I want to play, randomly and instantly, like sounds in a game.

Do I have to create a new MediaPlayer object for each sound? i.e...

MediaPlayer mp1 = MediaPlayer.create(context, R.raw.sound1); MediaPlayer mp2 = MediaPlayer.create(context, R.raw.sound2); MediaPlayer mp3 = MediaPlayer.create(context, R.raw.sound3); MediaPlayer mp4 = MediaPlayer.create(context, R.raw.sound4);

That seems expensive...

View 6 Replies View Related

Android :: Unable To Play Short MediaPlayer Sound

Apr 23, 2009

I have this task: Need to play short (0.3-0.4 sec) sounds all the time. When sound is played, it should start again, etc. User can press button to reset sound - it should stop and lunch.

I did many tests. I tried to create 1 MediaPlayer, then do this: MediaPlayer.OnCompletionListener complListener = new MediaPlayer.OnCompletionListener; code...

It works great on emulator and on device if I have eclipse+debugger on. When I disconnect debugger, I have very strange errors - sound can stop at all (till program restart), sound can start "repeating" (play 0.1-0.2 sec, then restart). Can someone please provide me some info about problem?

View 5 Replies View Related

Android :: MediaPlayer Plays Sound But Screen Is Black / No Video

Feb 14, 2009

I'm just trying to play a local video that is a resource with the MediaPlayer class in the most simple way possible. I have confirmed that the video works with players that I download from the marketplace, so I'm assuming that's not the issue.

The problem is that I just get a black screen with no video. There is audio from the file playing though, so I know that the file resource is being accessed correctly, it's just not showing anything on the screen in the emulator.

The one other note is that at any time whenever I try to access getVideoWidth() or getVideoHeight() I get this (non-blocking) error:

ERROR/MediaPlayerService(24): getVideoSize returned -1

Any ideas as to what I could be doing wrong?

import android.app.Activity; import android.os.Bundle; import android.view.SurfaceView; import android.view.SurfaceHolder; import android.media.MediaPlayer;
Code...

View 9 Replies View Related

Android :: MediaPlayer - Sound Stops When I Change - Suddenly Randomly In My Game

Jan 6, 2010

Why does my MediaPlayer
MediaPlayer mp = MediaPlayer.create(this, R.raw.somemusic); mp.setLooping(true); mp.start();

stop, wenn I change the layout?
setContentView(R.layout.screenoptions);

and also suddenly in my game, the sound stops. What could be the reason?

And which one is better? MediaPlayer or SoundPool?

View 2 Replies View Related

Android :: How To Handle Alarm Clock & Alarm Reciever Broad Casting To Pause Playing Mediaplayer

Jun 22, 2010

I am using service class to play the mp3 file using media player object on Android platform, problem is, i am not able to handle the alarm interruption.When any previous set alarm clock reach to it's alarm time it starts to play in parallel with mp3.I want that mp3 should become paused and after alarm it again start to play,same thing should happen with snooze.

View 1 Replies View Related

General :: Music Player Without Playing Or Jumping To Next Music File

Feb 2, 2013

Music Player which should STOP after playing a music file and should NOT Repeat or jump play the next audio file. Option of having Stop after playing a single music file.I know except VLC beta player- which has some hanging problems & needs to be forced quit sometimes (Motorola Phone).

View 1 Replies View Related

Android :: Using ASE And Playing Sound

Oct 26, 2009

I have a python application (anki) running under ASE. It is a simple web server that uses the browser as a UI. My only issues are playing sound, which are stored locally. On the iphone, anki uses a command line app (play) to play the mp3 files. Unfortunately, there is no command line app that I can call that takes a filename as an arg and plays it. What are my options with android?

- write a sound service that sits and listens for a filename to play; possibly listening on a port for filename

- write an Java-app that I call from within python that forks off and loads a specified file, plays it and then exits. Can you call other java apps from ASE?

- wait till the browser supports the <audio> tag. I guess this is html5, but am unaware if this will be on android any time soon.

View 2 Replies View Related

Android :: Playing Sound On App Startup

Nov 7, 2010

How do I go about getting my app to play an mp3 (in my res) on startup? Or how how about if I wanted this to happen when a button is clicked?

View 1 Replies View Related

Android :: Playing Same Sound Repeatedly

Dec 8, 2008

I have the following problem: when i try to play a sound over and over again, it sometimes (actually most times) is not played.the documentation says that one should use the media player in the following sequence if a sound should be played several times: is this the wrong approach? is there a more performant way to reset the pointer in the sound sample so that it can be played from the beginning? i tried using mediaPlayer.seekTo(0); but it didn't help. Code...

View 2 Replies View Related

Android :: Detect Sound Currently Playing On Speaker?

May 18, 2009

Is there any way to tell if an app is currently using the speaker (playing music or generating other sounds)? Specifically, I'd like to detect if an alarm clock is going off (not only the one that comes with the system, but any alarm clock), but I'll settle for simply knowing if any sounds are coming out of the speaker.

View 2 Replies View Related

Android :: MediaPlayer.start - Doesnot Work Fine After Calling MediaPlayer.seekTo - 0

Apr 27, 2009

I have a requirement to play several sounds many times in my game so instead of creating the MediaPlayer again and again I have called mp.seekTo(0) in onCompletion(mp) so that it will restart. Sometimes the sound is not audible from the device when I call mp.start () after setting mp.seekTo(0); but the player calls onCompletion() without playing any sound, this is observed randomly on most of the sounds

My sounds are of short duration mostly less than a second.

I am using a separate MediaPlayer for each sound (as I need this) -

There are almost 28 sounds in my game so i will be creating 28 MediaPlayers.

Below is the attached code for player

Also If I try to play many sounds one after the other in a short period of time i get an error saying "no more track names available". can u tell Why this is happening...?

check the below code:

CODE:........

View 9 Replies View Related

Android :: Keyboard Input - Touch Event Noisy

Jul 21, 2010

I'm working on a simple game: when you press a button on the screen, a character will run to certain direction. It's easy to support keyboard input. But, some phone doesn't go with a keyboard or even no a track ball. So I decided to draw a virtual "run" key on the screen (with opengl). When the user press the virtual key, I apply a velocity to the character. And when the user release the key, I disable the velocity to stop the character but there seems to be some touch event noisy. If my finger cannot press still, I will see millions of touch down and touch up events, instead of a single long pressing.

And occasionally, my program captured the touch down event when I touch the screen, but didn't capture touch up event. So my character will keep moving, even no finger is on the screen. I'm wondering if there is some way to reduce the touch event noisy and tell if the user is currently pressing on the screen, instead of only getting an event when touch up and down happen. It seems the system UI can detect long pressing, for example when you put a finger on one item of the list view widget, the entire item turns to orange. I just don't know how to detect pressing in my opengl game.

View 5 Replies View Related

Android :: Create Thread In Background For Playing Sound?

Nov 4, 2010

how create thread in background for playing sound?

View 2 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 :: 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

HTC EVO 4G :: What Program To Be Used For Playing Different Sound Files?

Oct 14, 2010

What program do you use to play these (MP4, WMV, MOV) files on your Evo? I can't they them to play.

View 3 Replies View Related

Android : Playing Bigger Size Audio Wav Sound File Produces Crash

Mar 25, 2010

I am trying to play the bigger size audio wav file(which is >20 mb) using the following code(AudioTrack) on my Android 1.6 HTC device which basically has less memory. But i found device crash as soon as it executes reading, writing and play. But the same code works fine and plays the lesser size audio wav files(10kb, 20 kb files etc) very well.

P.S: I should play PCM(.wav) buffer sound, the reason behind why i use AudioTrack here. Though my device has lesser memory, how would i read bigger audio files bytes by bytes and play the sound to avoid crashing due to memory constraints. Code...

Could someone guide me please to play the AudioTrack code for bigger size wav files?

View 1 Replies View Related

HTC Wildfire :: Playing Films - Sound But No Picture / Set It Up?

Nov 27, 2010

Just brought mt Daughter a HTC Wildfire for Christmas, thought i would put a film on for her, converted it to mp4 format, then opened phone on to pc and dropped film into the sd card....thing is when i play the film on her phone, all i get is the sound but no picture.

View 1 Replies View Related

HTC EVO 4G : Way To Stop Sound From Automatically Playing In MMS Messages?

Oct 21, 2010

I hope nobody's already answered this somewhere -- I've been searching for a few days now with no luck. I'm wanting to disable the audio in received mms messages. I absolutely loath those messages that scream, blare music, say offensive stuff, etc. With my old Lotus, you actually had to choose to play the attached audio, but I can't find anything anywhere to set this on my new Evo. If anyone knows how to either make the audio in messages manual instead of automatic, or just disable their audio completely, I'd be eternally grateful to learn this!

View 7 Replies View Related

General :: Audio Echoing - Playing Sound Twice?

Jan 22, 2013

I have a flash file that I open through smartswf and suddenly the audio is now echoing, like its playing the sound twice. It use to work OK on this ROM (cyanogenmod 10) with this app. It does the same with other flash files also. I have tried other apps and does the same thing, and tried reinstalling flash and rolling back to earlier versions with the same result.

View 1 Replies View Related

Android :: Background Music Playing

May 25, 2010

My question is : on the HTC Desire, is it possible to listen music with the default player, while doing something else like browsing the web? Because when I'm under the music player app, listening to something, and then I click (or long-click) "home" button, the sound stops. Also, while i'm listening to a track, if a phone call comes in, the music is paused, but when the call ends, the track position is lost and it starts from the beginning. Is all this normal?

View 8 Replies View Related







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