Android :: Playing Multiple Sounds - Error Shown On Log

May 19, 2010

I'm playing some MediaPlayer instances at the same time (4 or 5) but sometimes when I try to start a new media player it doesn't work and an error is shown on the log:

E/AudioFlinger( 1073): no more track names availlable E/AudioTrack( 1073): AudioFlinger could not create track, status: -12 E/AudioSink( 1073): Unable to create audio track E/VorbisPlayer( 1073): mAudioSink open failed

It also happens when there're only 3 or 2 MediaPlayer playing at the same time. What does it mean this error? How can I workaround with it? Actually checking the isPlaying() after the start() call does not seem very helpful as every call returns true. I've to say that every MediaPlayer is created once via MediaPlayer.create.

Android :: Playing Multiple Sounds - Error Shown on Log


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

Android :: Playing Multiple Sounds - Application Crashes

Jun 14, 2010

Shown are a few lines of code. If I play a single sound, it runs fine. Adding a second sound causes it to crash.

private SoundManager mSoundManager;
/** Called when the activity is first created. */
@Override public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); setContentView(R.layout.sos);
mSoundManager = new SoundManager(); mSoundManager.initSounds(getBaseContext());
mSoundManager.addSound(1,R.raw.dit); mSoundManager.addSound(1,R.raw.dah);
Button SoundButton = (Button)findViewById(R.id.SoundButton);
SoundButton.setOnClickListener(new OnClickListener() {
public void onClick(View v) { mSoundManager.playSound(1);
mSoundManager.playSound(2); } } ); }

View 1 Replies View Related

HTC Eris :: Two Files Of Notification Sounds Shown In List?

May 25, 2010

Why I might have 2 of every sound listed on my phone? When I go to change ringtone or notification sounds there are 2 of every sound listed. Both options work, too.

View 3 Replies View Related

Android :: Playing Sounds From Assets Folder

Nov 9, 2010

I have 5 mp3 files stored on the assets folder. The files are all 25 KB. I load the files using:
manager = context.getAssets();
this.inputStream = manager.openFd(fileName).createInputStream();
Whenever I try to play the files, the sounds are all messed up like they were mixed or something.
I've zip aligned the app already but with no results.

View 3 Replies View Related

Android :: Playing Simple Sounds On Emulator

Feb 16, 2009

I am working on the Eclipse Emulator and with SDK 1.0 Release 2. What I would like to do is to play a simple C note with with code. Does android provide the necessary interface to produce such note sounds? Is there a sound library and API I can readily use on the device (and emulator)?

View 3 Replies View Related

Android :: Playing Recorded Sounds In Application (Target 1.5)

May 1, 2009

I have an application that I developed using the Android 1.1 SDK that I am trying to port to Android 1.5. In my application, I record a sound through the microphone and then do various things with it, including playing it back using a MediaPlayer object. My code works fine when I use the 1.1 target, but when I use a 1.5 target I get this error when setting up the player:

Command PLAYER_SET_DATA_SOURCE completed with an error or info PVMFErrNotSupported error (1, -4) Couldn't setup MediaPlayer java.io.IOException: Prepare failed.: status=0x1 at android.media.MediaPlayer.prepare(Native Method) at org.byu.chum.AudioUtils.AudioRecording.stopRecording (AudioRecording.java:92) at org.byu.chum.SoundRecorder.Recorder$StopListener.onClick (Recorder.java:198)...

It seems like Android isn't liking the format of my media, but I don't know why, since I just recorded that very format on the Android device. Here's the code that is throwing the error:

player = new MediaPlayer();
try { player.setDataSource(recordFile.toString());
player.prepare(); } catch (IOException e) { Log.e("playRecording", "Couldn't setup MediaPlayer", e); }

View 13 Replies View Related

Android :: Media Player Not Playing Sounds On Droid X

Jul 28, 2010

I have some pretty simple Soundboard applications on the Android Market that work flawless on an LG Ally, the Motorola Droid, and the Nexus One, but I recently received an e-mail from a user with the Motorola DroidX claiming that most of the sounds do not work. I've exchanged a few e-mails with him. He claims the Soundboard is the only application running, and he's double checked to make sure that the Media Volume wasn't set to minimum. I really don't have access to one either to play around with. The application isn't doing anything cosmic to play the sounds. Below is a code snippet. Any insights into what might be causing the hang up are greatly appreciated.

public void play(Sample sample) {
Log.v(TAG, "Playing: " + getString(sample.getButtonTextResId()) + " (" + sample.getSoundResId() + ")");
if (mPlayer != null) { mPlayer.stop(); mPlayer.release();
} MediaPlayer player = MediaPlayer.create(this, sample.getSoundResId());
mPlayer = player; if (player != null) { player.setVolume(1.0f, 1.0f);
player.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
@Override public void onCompletion(MediaPlayer mp) { mp.release();
mPlayer = null; } } ); player.start(); } }

View 1 Replies View Related

Android :: Playing Sounds In Game Application Using Media Player

Feb 5, 2009

I am using mp3 sound in my game (used wav format also) while playing sound I get problem as "obtainBuffer timeout (is the CPU pegged)" and then sound gets played after some time i.e it is not synchronized with the game play.

View 10 Replies View Related

HTC EVO 4G :: Playing Sounds With Headphones Plugged In?

Jun 4, 2010

So I plugged some headphones in so I could try ringtones. It plays out the speaker and the headphones. Is that right? going to try some music next.

View 1 Replies View Related

HTC Wildfire :: Hissing When Playing Music And Other Sounds

Oct 15, 2010

I just noticed a very unpleasant thing about the wildfire - while listening to music (or when playing any other sound), I can hear subtle hissing in the background. It is almost unnoticeable when I'm outdoors and there's noise outside, but it prevents me from listening more quiet music like jazz at home.

Can anything be done about it? Do you people also hear that (you have to be in complete silence and use decent headphones - the hissing is easy to notice as it disappears after 2 or 3 seconds after you pause music). I was so happy about my wildfire - I have 16gb sdcard so I thought it would make a great mp3 player.

View 2 Replies View Related

HTC Droid Eris :: Multiple Google Calendars Not Shown On Phone Running 1.6

Mar 3, 2010

I've created multiple sub calendars within my standard gmail calendar account to managed my kids calendars. Doesn't look as though these calendars will come over to my Eris running 1.6. Is that correct? Any work around or am I missing something?

In the calendar option on the phone I see:
My calendar
My work gmail calendar
Outlook

View 9 Replies View Related

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.

View 1 Replies View Related

HTC Incredible :: Possible To Set Multiple Notification Sounds For Texts?

May 5, 2010

Is it possible to set different notification sounds for different contacts? By this, specifically, can the Incredible be set to play one ringtone for my husband's texts and a different ringtone for my sister's texts? And if so, how?

View 9 Replies View Related

Motorola Droid :: Multiple Notification Sounds?

Mar 16, 2010

Im trying to find out if you can have multiple notification sounds on the droid. One notification sound for a text message, another for gmail, another for SSM, ect. I got missed call but it doesnt have gmail notifications to change.

View 3 Replies View Related

Android :: Controling Playing Of Song Over Multiple Activities

Nov 14, 2009

Suppose I want to start a song in Activity A see to it that it plays in Activity B when I move from Activity A to B Now after moving from Activity B to Activity C I want to stop that song and play another song.Please I need Help on this cant figure it out some how

View 2 Replies View Related

Android :: Playing AudioTrack Multiple Times Producing Crash

Mar 16, 2010

I am trying to play audio buffered sound (.wav) using AudioTrack. Please see the code below. I need to call this function under a Thread to support simultaneous play. It is fine being under a Thread. It is working fine playing the sound normally. But if i execute playing the sound using AudioTrack one after another continuously (i.e. executing second play before completing the first play sound), produces device crash (force close unexpectedly error). Does anyone come across such problems and resolve it in a way?

View 1 Replies View Related

LG Ally :: Getting Error In Setting When I Hit Sounds And Display / Fix It?

Sep 30, 2010

In my settings menu when I hit sounds and display I'm getting the error

Sorry!
The application Settings (process com.android.settings) has stopped unexpectedly

I've tried restarting the phone several times and still get it.

Any clues?

LG Ally
Firmware= 2.1 update 1

View 1 Replies View Related

Android :: VideoView Causing Error For Playing Videos

Apr 16, 2010

I am attempting to make a VideoView to obviously play videos on. When I use the following code though I get the error "Cannot cast from View to VideoView" on the marked line below.

public class VideoView extends Activity { private String video_link;
private VideoView video_view;
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.youtube_player);
video_view = (VideoView) findViewById(R.id.video_view);
***ERROR "Cannot cast from View to VideoView"
Bundle video_bundle = getIntent().getExtras();
video_link = video_bundle.getString("LINK"); } }

View 3 Replies View Related

Android :: Getting Media Player Error While Playing File / Fix It

Mar 9, 2009

I am also getting the same error while playing the media file

E/MemoryHeapBase(31): mmap(fd=20, size=233472) failed (Invalid argument) E/VideoMIO( 31): Error creating frame buffer heap.

View 2 Replies View Related

Media :: Error Playing Videos When Switching To HD Mode

Dec 22, 2009

I noticed a lot of times when you play a YouTube video,it just doesn't play.Sometimes they do play and I go to switch to HD mode and then a message pops up saying the video can't be played.I thought this was a YouTube issue only,but it also happens with my app Where when I try to watch movie previews and switch to HD.Any suggestions

View 2 Replies View Related

Android :: Error Using InstrumentationTestRunner With Multiple Projects

Oct 8, 2009

My application is seperated into three projects in eclipse. The first one is a client Android Project called "Project A". The second is a server Android Project called "ProjectB". Lastly, I have "ProjectATest" for testing that has references dependencies to "ProjectA" and "ProjectB".

When excuting InstrumentationTestRunner in "ProjectATest," I get the following error message:

CODE:.........

This is the error as pulled from LogCat:

CODE:......................

View 5 Replies View Related

Motorola Droid :: Multiple Facebook Links - Error

Nov 15, 2009

For several of my contacts, viewing their contact page will show multiple links to their facebook account.

For example, I lookup John Doe and it'll show:
[PIC] John Doe
Call Mobile
Email Home
Facebook Profile
Facebook Profile
Facebook Profile
Facebook Profile
Facebook Profile

Clicking on any of the Facebook profile buttons takes you to the same facebook page. Anyone else seeing this issue? I have one Gmail account and one Facebook account on this phone and that's all I've ever had...

View 3 Replies View Related

General :: Getting Calendar Event Sounds Without GMail Sounds

Apr 28, 2012

I have a Droid Bionic. I like it. But I was recently having some GMail syncing issues and during the troubleshooting for that I uninstalled the latest GMail update and reinstalled it. As a result, GMail is now doing audible notificatrion sounds for new email when before I only had notification in t he notification bar. I can't seem to get it turned off. I still want calendar events and texts to sound so I don't want to silence the phone but I want email and GMail to be silent (Notification icon only).

View 5 Replies View Related

Android :: Pros - Cons Of Multiple Activities In An App Vs One Activity - Multiple Views

Aug 16, 2010

Are there design guidelines to help decide if an application with multiple views should be designed with multiple activities or just one activity and control the back button itself.

I've tried both. My most complex applications using one activity per screen. However, now that I'm successfully written an app with just one activity and handling the back button myself, I don't see any compelling reason to use multiple activities. The one activity application is much simpler and more straightforward.

What advantages of multiple activities am I missing?

View 8 Replies View Related

Android :: Use Multiple Activities Or Multiple Content Views

Feb 18, 2010

I'm working on an application using xml layouts.

I wish to know which is better:
1. Use few activities and change its contentview
2. Use an activity for each 'view' needed

If both works, in which case which option would be better?

View 1 Replies View Related

Android :: Should App's With Multiple Layouts Have Multiple Activities To Handle Each

Jul 1, 2010

I'm planning to develop and app that presents the users with several different screens (of different information).
Was wondering what would be the best way to implement this?

Is it better to have separate XML layouts and an activity to display and allow the user to interact with each screen of data?

OR would handling all of these in the same activity be more efficient (and dynamically load / unload each layout)?

View 2 Replies View Related

Android :: XML Layout Not Shown / Way To Fix?

Apr 29, 2010

For any Android project that I create using Eclipse, I cannot see the preview of the XML layout that I define. It gives a message saying "Eclipse is loading framework information and Layout library from the SDK folder. XXX.xml will refresh automatically once the process is finished."

View 2 Replies View Related

Android :: Overlays On A Mapview Not Shown

Mar 1, 2010

I followed the instructions from the google hellomapview tutorial. I get a working mapview etc. But the two items that are added to the map are not shown. It seems they are there somewhere because tapping at the specified location shows the message that was added to the items.

Here is my source code. It should be very close to the google tutorial source code.

CODE:.............

View 2 Replies View Related

Android :: Don't Show Notification When App Shown

Aug 5, 2010

1/I don't want to notify user if this one is already running my app in foreground,is it possible before create nofification to check if my app is not in front? 2/if app is in background, is it possible to bring last state in front? I know that Os can destroy some Activity, but is it possible to restore last state, don't start a new Intent? because if i start a new Intent and i push back, old Intent appear it's not very beautiful to have 2 identical intent launch...............

View 2 Replies View Related







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