Android :: Play Continuous Background Music Using Sound Pool

Nov 25, 2009

I am trying to play continuous background music using sound pool.

Here is my code:

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

when i do playSound() with 1, 2, 3 sound [wav file] with looping false, they play fine. but if i call playSound any of the 4 files with looping true, it does not work. 4th one is an mp3 file which neither plays with looping true nor looping false. can i create another mediaplayer object as a member variable and use it for only background music ?

ADVERTISEMENT

HTC Incredible :: Music Player Doesn't Sense When There Should Be Continuous Play Between Tracks

May 6, 2010

Are you using the stock player? I'm not so happy with it. My biggest problem is that it doesn't sense when there should be continuous play between tracks, so you hear the breaks. Has anybody found something better?

View 29 Replies View Related

Android :: Plans For Improving The Sound Pool System

Jul 3, 2010

I have been finishing off the port of one of my games to Android, with the last two things being music and sound effects. I have implemented the music system now, using a series of MediaPlayer instances, and that all seems to be working fine (I only need to do limited things with music, just playing, pausing and stopping really). I am now trying to finish of the sound effects, but I am struggling.

1. I am targeting Android 1.6+ and therefore do not have access to the setOnLoadCompleteListener function. What is my best way to wait until all sound effects are loaded? I am thinking my best bet is to load all my sounds, then load a dummy (short, silent) sound, and then sit in a loop attempting to play that sound (and then sleeping for 1ms) until the play returns non zero. Does this sound reasonable? Would it be crazy to do this process for every sound effect I load, as the calling code expects the load function to stall as long as it takes for the load to complete - I am not interested in the sound pool trying to do any async stuff for me, all of my background loading is done in a separate thread, and this thread can stall as long as it likes, as long as it actually loads what I am asking it to.

2. Is there anyway I can find out when a sound effect has finished playing? The games I am porting might have code along the lines of 'play sound effect, wait for it to complete, then fade the screen out and load next context' which on other platforms is easy enough to implement. In OpenAL for example, at the end of each frame I check if the OpenAL state for a given SFX is now stopped, in which case I update the game side sound handle to let it know it's now in the stopped state. But I just can't seem to find a way to achieve the same thing on Android. I am beginning to think my only option would be to (somehow) work out the length of the sample, and then when play is called, set a timer to trigger 100ms after the sample time (100ms to account for any delay in the sound starting), and in the timer function set the game side sfx state to be stopped. Does this sound reasonable? Are there any better ways of handling this?

3. Will a sound pool run out of ids? It seems it have been designed so you have one sound pool per 'level' and after each level you release the pool. This doesn't really fit too well with all my code so I am trying to avoid it. But I notice the documentation states a lot of functions will work even after a sound id is no longer valid (it has stopped for example), the functions won't do anything, but they want break anything. This to me says that id's are never recycled. So are there limits? If so what are the limits?

4. Finally, are there any plans for improving the sound pool system? Ideally I'd like to see it work in a similar way to the other main sound APIs. The reason being I target multiple platforms on the engine side, and have 100% generic game code, so I need to establish a base level interface to the API which will work across the board. This is made very difficult by the SoundPool API being set up to work in a specific way, as opposed to just having reasonable low level functions, and allowing the end user to wrap this up how they see fit. I like the fact there are high level classes around to handle this work of work, and I agree these should remain, but I'd like to see something perhaps lower level exposed, which the SoundPool could wrap around perhaps.

View 2 Replies View Related

Games : Download - Play Online Pool Pro 2 For A Smartphone?

Mar 11, 2010

I was wondering can you download and play the online game Pool Pro Online 2 for a smartphone like an Android device? I have it on my Dare and when I switch to a Android phone, I want to still be able to play it online.

View 3 Replies View Related

Android :: Way To Change Background Dynamically As I Play Music?

Aug 9, 2009

I am trying to set the background dynamically as I play music. 1) I am able to set the background using the setBackground (Color.GREEN) method. 2) Then I play a MP3 file (audio) using the MediaPlayer. 3) when I call myPlayer().isPlaying(), I would like to keep changing the background color continuously till the music stops.

View 3 Replies View Related

KitKat 4.4 :: Play Music Audio Level Lockscreen Background?

May 11, 2014

I have a friend at work who has a cheapie smartphone running vanilla Android and whenever he has his phone playing on the dock his lockscreen displays the audio levels behind the password prompt.

Audiophiles, I don't know the correct term for it, but it's all those little lines that go up for each frequency range. The treble side is on the left, bass is on the right.The background is black, the levels thing is a light blue-ish color.

I know he uses Play Music and he has a Pattern Lock, but so far I haven't been able to replicate it on my phone.My phone is a Galaxy S4 with 4.4.2 and the latest Play Music, swipe unlock, and a static picture as the background.I see no options for the levels thing in Play Music nor in my lockscreen settings.Is this something only in vanilla Android that Samsung tossed out?I think it looks really cool; better than the square album artwork awkwardly cropped to fit a rectangular screen.

If this is something vanilla only, are there any good free equivalents in the Play Store you'd recommend?How about compatibility with Rocket Player?

View 1 Replies View Related

General :: Is That Normal That Google Play Music Stay In Background

May 17, 2013

i've updated to the last Google play music, but now even if i don't use it i've a background service of this app .. is there a way to avoid this background service when not using it ? Even if i didn't launch it of the whole day i have this service ..

View 5 Replies View Related

Samsung I7500 : Audio Sound Not Clear When Play Music

May 26, 2010

So i didn't put any unofficial software,in other words,everything is as it came out of the store (except lots of apps ofc. the problem is that i doesn't play any sound when i want to play music,or with some app (without headphones,when i have them then it's normal) but when someone calls me or i set an alarm then it plays perfectly normal so i'm confused...it's obvious that speaker is not broken.

Then today suddenly i can't hear anything when i'm in a call,and the person from the other side also doesn't hear me,i also don't know why is that...i'm not an expert for this kinda things and actually i'm quite knew in this world.

View 3 Replies View Related

Android :: Need Continuous Play Video Player

Feb 8, 2010

Has anyone found a video player that automatically plays the next video when the first video ends like episodic videos?

View 2 Replies View Related

Android :: RTSP Streams Play Only Sound - While Local Does Video And Sound

Jul 10, 2010

In my application, RTSP streams play only sound without video, but if i specify the video path as a local file, it plays the video and audio.

How would i get the RTSP streams to show video?

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

View 2 Replies View Related

General :: Nexus 5 - Google Play Music / Song Play For A Second Then Pauses

Nov 7, 2013

Recently I've been having an issue with Google Play Music where when I play a song, it plays for a second then pauses, so I have to press play to get it going again. This occurs repetitively which means I can't listen to music.

It happens on songs that are being streamed and on songs that are on the device.

Funnily enough, if the song is played through ES file explorer and the little play music popup window comes up, it plays fine.

I've got this issue on both my devices, a tf101 running 4.3 and a nexus 5 with stock 4.4 rooted.

Edit: just remembered, I've also got this issue with MX Player and videos. I can't figure out what's wrong.

Streamed videos played through the gallery video player work fine.

View 3 Replies View Related

Motorola Droid :: Handle Voice Commands Such As Play Music - Party Shuffle - Play (Artist)

Feb 5, 2010

I was just wondering if the Droid can handle voice commands such as "Play Music", "Party Shuffle", "Play (Artist)", "Play (Song)", "Play (Album)", "Open Email", "Play (Video)", etc, etc; or if there are plans for this in the future firmware? I personally could make use of this, especially "Play (Artist)". I tried to make it play a song and it called my grandma ):

Also, can anyone tell me the difference between voice search and voice dialer? It seems like when I use voice dialer, I say "Call Home" and a list of options pops up of who to call (one choice being Home) (When I wish it would have just automatically called Home), but if I use voice search it automatically does call Home.

View 3 Replies View Related

HTC Incredible :: Trying To Play Music - Says Unable To Play This Type Of Audio

Apr 28, 2010

I took out the 8GB SD card from my Blackberry Storm and put it the Incredible.

I had a bunch of music saved on my SD Card that I downloaded from VZW Music Media thing.

When I go to music on the Incredible and go over the song (it shows the picture of the album of the song)

it says "unable to play this type of audio"

View 10 Replies View Related

General :: Google Play Music / Why Does It Cache Extra Music When Streaming Just One Song

Oct 9, 2012

when I want to stream one particular song I noticed that the Google Play Music app downloads and caches the previous/next few songs for quicker access. How can I prevent this? It uses a lot of data and I usually only want to listen to the one song I chose to stream.

For example if I play a 6 mb song i noticed it uses about 40 mb to stream just that one song. Then I selected a different song to stream and immediately went into settings > download queue and noticed it was loading more songs than the one I requested. I only want to listen to the 1 song I chose, so how can I prevent the other songs from loading? As far as I can see there is no way in the app's settings but there has to be another way to stop this inconvenience.

P.S. I have a T999 galaxy s3 running on stock rooted ICS

View 1 Replies View Related

General :: Remove DRM From ITunes Music So It Can Be Uploaded To Google Play Music?

Oct 29, 2012

I currently have an iPhone 4S and I am probably going to get a Galaxy Note 2 when it comes out for Verizon. In order to prepare for this, I set up Google Play Music to upload my music so it can be ready for me when I get my new phone (I like it better than Samsung's default music player). Only one problem: protected AAC files (or DRM) can't be transferred to Play Music. I tried converting my music with 2 different DRM converters, but they were free trials, and it only would convert 1:00 of each song and then stop. Is there any free way to convert each protected song completely, along with protected videos? Also, does music on Play Music eat up an Android device's space? I have over 12 GB of music and movies and I don't want to have barely any any space left on a 16 GB device if a 32 or 64 GB ever comes out, minus the SD card.

View 2 Replies View Related

General :: Where Does Google Play Music Store Music Files On Device

Apr 10, 2013

I have music that is playable with Google Play Music player, but not with other players. I have chosen for the music to be "on the device", and it plays when even in Airplane Mode, so I know it is not streaming, but the music files do not show up in my "Music" directory tree, or under any other file trees that I can find. I have used ES File Explorer to do a top down search for some of the missing titles, but it doesn't find them. I'm perplexed. There must be a cache somewhere, but I can't find it.

View 5 Replies View Related

General :: How To Move Music From Google Play To Stock Music Player

Feb 3, 2013

Trying to find a way how to move music from google play to the stock music player. It has better sound quality, in my opinion, than google play itself. Any way to get music from google play to the music player app that comes with Android Ics.

View 9 Replies View Related

General :: Clearing Pinned Music From Device In Play Music?

May 23, 2013

I've been an Android user since the G1.

I have a Nexus 4 with a considerable amount of "pinned" music in the Play Music app taking up storage space. This pinning seems to have taken on a life of its own, and I'm finding that the app is permanently storing music locally that I never wanted downloaded.

So my question is this: what's the best way to completely clear everything that's been "pinned" so far, and start over? I knew how to unpin music in the app before the recent design refresh, but now I'm not seeing it anywhere. Is there a way to just unpin everything through the app? Or can I use a file manager or connect the device to a PC and just delete the music files?

View 8 Replies View Related

General :: Play Music / Gingerbread And Deleting On-Device Music

Aug 28, 2012

I use Google Play Music. Over time, I've chosen certain albums to store locally ('pin') from music.google.com on my Android 2.4 phone. Now I wish to clear these out from the phone in the name of space and begin anew.

Without an apparent way to do this on the phone (?), I connected the device to a computer and wiped out the Android music directory's files manually.

Then, when I returned to my phone's Play Music app and attempted to choose new music to pin to the device, Android is re-downloading *all* of the music I had previously chosen to store locally, completely defeating the purpose of this pursuit.

Is there a way to start fresh on the phone without deleting music from URL....? I simply want to download a select few albums to a device from my Play Music account, not everything I have ever selected to pin since my history with the service.

View 2 Replies View Related

General :: Google Play Music - Changing Music Tags From PC

Apr 13, 2014

I recently started using the Google Play Music free service, so I uploaded my complete music collection with the Music Manager software, everything is cool but I noticed that some of the album art looks kinda bad on my Nexus 7 (I guess is because the resolution). So my question is, if I were to change a tag of a song on my PC, will it be automatic updated to my google play account?

View 1 Replies View Related

General :: Play Music - Pinning Music To Device?

Dec 1, 2012

I have a quick question. When one chooses to pin music to your device in Play Music, where does Play store the music?

I can see the icon that play is downloading, but I couldn't find the downloaded music. Not looking in the right place.

View 2 Replies View Related

Android :: Apple App Football Pool

Sep 13, 2010

Really wish someone would develop an Android App like this one: Football Pool '10. Really handy if you are in a football pool

View 3 Replies View Related

HTC Wildfire :: Music Won't Play In Music Player

Aug 24, 2010

I can get my music onto my phone and use them as ringtones, alarm tones and message tones but when i managed to do this they won't play in the music player, it says "no music found" but when i change my music to a different folder to get it to play in the music application. I then cant use them as my ringtones, message tones etc.

View 2 Replies View Related

General :: Insert Background Sound-fx In Call?

Sep 23, 2010

android app that can add or mix a sound file during a call such that the other person can hear it too. Looping perhaps. Then I could play a background porno music while talking to my fiancee.

View 6 Replies View Related

Motorola Droid X :: Music Player - Play Songs In Alphabetical Order - Play All Songs By Artist

Jul 31, 2010

Coming from a Iphone to the X the music player is a little lacking. Often I will go into a certain artist and want to play all the songs by that artist, or thumb through all their songs to find a certain one. On the stock music player on the X this seems hard to do (maybe I'm missing something).

if I pull up the music by artist and select a certain artist then it shows me all their albums (The iphone has the option at this point to select all albums and see all the songs of that artist in alphabetical order). The X doesn't give a option to select all albums at this point. If I go to artists and long press on a certain artist I can select play and it will start playing all that artists songs, then I can hit pause and go into the list from that point to see all the songs but they seem to be in a random order making it hard to find a specific song.

I've tried a couple other players and haven't been able to find one that functions like the Iphone, makes it hard to quickly find one song.

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

Can't Play A Sound When Call Out

Jan 26, 2012

I Can't Play a sound when a call Out.

View 5 Replies View Related

Android :: Need Sounds To Play Continuously In Background

Nov 24, 2009

I am using soundpool to use sounds in my app. One of the sounds i need to play continuously in background. any example how to do this ?

soundPool.play(soundPoolMap.get(sound), streamVolume, streamVolume, 1, 0, 1f).

View 3 Replies View Related

HTC EVO 4G :: Video Recorded Will Not Play With Sound On PC

Oct 7, 2010

I have had my Evo since launch day. I have recorded some videos for fun and they play back on the phone nicely. But today, I connected the phone to my PC and wanted to play a video. I got video with no sound. I tried several I recorded some at 720fps and some at VGA. Same results. Videos I downloaded from You Tube play fine. Just the ones I recorded on my phone. I have a relatively new HP running Widows 7 and have used Quick Time and Windows Media Player. Neither would play the sound. Anyone have a problem like this?

View 4 Replies View Related

Android :: How To Get A Wav Sound To Play On Phone?

Mar 16, 2010

Im making an app, and i want it to make a sound when a activity is opened , the sound file is in R.raw.sound_file , if someone could do some example code to make my app play a sound that would be great.

View 1 Replies View Related

Android : Way To Play Sound File?

Jul 22, 2010

Can we play sound file in phone line (in background)?

View 4 Replies View Related

Android :: Music Website - Play Music On Android - Blackberry - Iphone - Symbian

Jul 14, 2010

How can I make my simple site, on which the user can choose to play a number of music clips by clicking on little "play" buttons on the page (think of Amazon's "preview" on their product pages for CDs), work on mobile devices?

[I originally created the page thinking only of desktop browsers, so currently it works by using Flash. I know that won't work at least on the iphone.]

Will I have to build a platform-specific app for all major mobile platforms to provide this kind of simple interface? If so, can you recommend a framework that will let me do this in "write once, run everywhere" fashion?

View 1 Replies View Related

Android :: How To Play Video With Screen Off Player In Background?

Nov 30, 2009

I love my Eris BUT it is inferior in one critical area (too me) - I like to use my player t"watch" VIDEO podcasts or tivo'd news shows. Much of the time, I do not need to actually see the video (just want to hear it). So is their a video app that will let me play the video and turn the screen off and/or play video while I use the device to do other tasks. Seems like a simple feature but I cant find it anywhere for the Android.

View 4 Replies View Related

General :: App To Play Audio From YouTube Videos In Background?

Jul 27, 2013

I'm looking for a free app to allow me to play videos in the background. I tried 'Pvstar' but had a glitch with it where it stopped working.

I'm using a HTC one, so there are no issues with processing power.

View 2 Replies View Related

General :: Any Way To Play Google Drive MP3s In Background?

Sep 23, 2012

I've got a bunch of MP3s in Google Drive, and I'd like to be able to play them on my Android. The problem is that when I play an MP3 on the phone, no matter what app I choose to use to play it (and I've tried a bunch!) the MP3 opens in such a way that if I then switch to another app, playback stops. In other words, the Google Drive MP3 won't play in the background.

Is there any way to make MP3s play from Google Drive in such a way that they WILL play in the background? I've found some awkward workaround to do this -- like downloading the MP3 from the Google Drive web app, or like pinning the MP3 in the Google Drive Android app and then using an Android file manager to find the file and copy it to a folder that the music player searches -- but I really wish there was a better way!!! Galaxy Nexus

View 6 Replies View Related

Android :: Stop Sound Notification - Let It Only Play Once

Jun 24, 2009

Since i don't want to have double entries, but would like a fast spreading, here's my post:
http://groups.google.com/group/android-beginners/browse_thread/thread...

View 2 Replies View Related

Android :: ListPreference To Play Sound Is Not Working

Aug 28, 2010

I'm trying to use a ListPreference to decide which sound to play on a button click.

I have this at the top:

public String greensound;

Here's my OnClick code:................

I also tried removing the default value here it didnt seem to change anything but, should it be removed?

Here's my Settings.java:

package com.my.app;

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

And here's my array's if that will help at all:

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

Here's a logcat that kinda looked possibly related:

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

For those that might ask here's my DDMS > File Explorer > Data > Data > packageName > SharedPreferences This is what was in there:

com.my.app_preferences.xml:

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

This all really confuses me more because...It looks like greensound does == gsone so.... I don't understand whats wrong its not even playing the default sound. and yes i've tested all this code without the listpreference code and they work great. I'm not sure what's wrong?

View 1 Replies View Related

HTC Incredible :: Way To Get Different Sound To Play For Text Messages?

May 20, 2010

Is there any way to get a different sound to play for text messages than emails? It would be kinda nice to know in the middle of the night whether I need to reach for my phone or not. Shouldn't be an unreasonable request, but I can't see any way to do it on the phone.

View 5 Replies View Related

HTC Incredible :: MP4 Files Wont Play Sound On PC

Oct 28, 2010

I have an HTC Droid Incredible and record my video in 720p. When I copy the file to my pc Windows Media Player does not play the audio of the .MP4. The video plays fine however. (All playes fine on the phone)

I have a camcorder that also records 720 mp4 files, and it plays audio and video just fine on the same pc.

It is possible that another player might play the file fine such as VLC, but I like Windows Media Player, and prefere not to have 3-4 media players taking up resources on my pc.

View 2 Replies View Related

Samsung Captivate :: How To Play Movies With 5.1 Sound?

Jul 18, 2010

I'm not sure if it's a bug or missing feature but I can't seem to play movies that are encoded in 5.1 sound. The Captivate will play high bitrate video fine and that is awesome, but it would be silly to expect someone to encode a movie in a high bitrate and only use a stereo track.

View 1 Replies View Related

Android :: Play Sound On A Timed Interval

Aug 27, 2010

I have an Android app which needs to play a sound resource on a timed interval, say every 120 seconds. I know how to access the sound resources and play them, however it's time timer part I'm not sure of. What's the best approach?

View 1 Replies View Related

HTC Incredible :: Sound To Play With USB Connection On A Computer?

Nov 18, 2010

Does anyone know if it is possible to get the sound to play with the USB connection on a computer? I know I could probably get a head phone jack, but it would be much easier to have one cable. (example, I'd like to play the fm radio through PC speakers)

View 1 Replies View Related

Android : Way To Play Sound On Active Call?

Aug 28, 2009

I am playing one audio file when call arrives so the caller can receive it at other side but the issue is yet the opposite caller is not able to listen it what could be wrong in it. Can some one tell me what can be the issue in it ?

View 2 Replies View Related

HTC EVO 4G : Turn Sound Off / Doesn't Play When On Phone

Jun 21, 2010

Can I turn off sound so when I turn on the phone the sound doesn't play.

View 1 Replies View Related

General :: Play Sound (WAV / MP3) From Command Line?

Sep 13, 2012

Is it possible to play sound on Android device from terminal command line? How to do it?

View 1 Replies View Related

ADVERTISEMENT