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
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 ?
View 3 Replies
View Related
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
Dec 21, 2013
I have trouble to porting sound system from htc-DHD to htc-Evo 3D device
both devices use ICS 4.0.4 cook rom
I found that the music sound on DHD much better than in Evo 3D, especially the sound enhancers has more options
This is DHD sound enhancer
This is Evo 3D sound enhancer
The appearance is no matter because it is related to htcSoundEnhancerSetting.apk file. But I need the true working sound libs files that related to the htcSoundEnhancerSetting.apk
I so much love the htc 5.1 surround sound option. So, I want to port sound system libs from DHD to Evo 3D to attemp test. But I don't know which files are need to copy. Some hint to port the sound system from DHD to Evo 3D.
View 2 Replies
View Related
May 10, 2010
I'm trying to set it up so I have a different notification sound for VM & SMS. I know HOW to do it but for some reason my Incred is not saving the changes I make & is using the system default notification sound for everything. Is anyone else having this problem?
View 21 Replies
View Related
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
Jan 22, 2014
I've just upgrade my S2 from andriod 2.3ish to 4.1.2. Before doing so I changed the default system sound to that droplet sound (in the normal settings view, no root, nothing special with this phone) but now I've upgraded the 'normal' setting to change 'system sound' has gone. Have they really just scrapped that option?
View 3 Replies
View Related
Jul 21, 2012
I have a samsun galaxy s2 t989 from t mobile, and i have a aquestion, how I can adjust the volume. I enter the options menu sound system and upload volume but low volume listening. I saw on the internet a key * # 197328640 # I can get but I can not change the speaker says the value of 53, this would be the reason why I listen to low.
View 4 Replies
View Related
Mar 7, 2009
Alright, at the risk this has been discussed before, let me alert everybody that there are customers on metered data plans out there (metered as opposed to "unlimited"). This is the first time I've heard of it: http://groups.google.com/group/android-discuss/browse_thread/thread/2... So heads-up when you use wake locks to keep data connectivity alive.
I develop with such a scenario in mind, but nonetheless will include a note in my manual(s) to not use my app on a metered plan, just to err on the safe side.
View 7 Replies
View Related
May 20, 2010
Android 2.2 Froyo Update: HTC Release Date Plans in 2010 : Product Reviews Net. Hopefully this holds true and at the beginning of Q2 like June 4th!
View 6 Replies
View Related
Nov 7, 2009
The Donut VoiceDialer is far from ideal for in-car use because it requires users to confirm their selection by tapping on the screen. My idea is to enhance it so that it can be hands-free from start to finish.I was looking at VoiceDialerActivity.java and the most interesting part is the function onRecognitionSuccess(), which starts at line 383.We could modify it so that if there is more than one item, it reads the items out loud and then does another recognition cycle among those items.
View 4 Replies
View Related
Mar 19, 2010
Is there any plans to support the onGestureXXX set of events like the iPhone's webkit has?
View 3 Replies
View Related
Jul 17, 2010
I just recently graduated college with a B.S. in Computer Science with a focus on software development, particularity in Java. After graduation I got hired as a Java developer for a company in my area (been there for about a little over a month now). I also starting picking up Android development late in my college career since it closely resembles Java syntax and was easy to jump into.My question is, what would be some good Java / Android projects to do and books to read for recent post-graduates in the software development field focusing on Java?
View 3 Replies
View Related
Jun 2, 2010
I just spoke to a rep and was told that for four people, the price was: $140 for first two lines (includes $10 EVO premium)$40 for two other lines.Wth tax, this is almost $200 and not counting any insurance you might want to add. The reps stated if you buy the EVO and more than one line, you must get the 1500 minute plan. My family of four rarely breaches 600 minutes of our 700 minute plan (my family are mainly text maniacs).Since I would be forced into a 1500 minute plan and pay the $10 premium, the Sprint plan would be about $40 more than VZW. If you use the minutes, it would be fine, but not only are you forced into $10 more, you also are forced into the 1500 minute plan- even if you do not need it.Is this what others are being told? I was going to get the EVO to test it out, but may just wait for all the testers here to report back, through the next few weeks.
View 41 Replies
View Related
Jul 13, 2010
It's hard to believe that Android would be lacking the following features from its own creator:
-remote wipe
-backup
-file/photos sync
-lost phone tracking
-"itunes" sync
Just wondering if Google mentioned they would be making one.
View 1 Replies
View Related
Oct 14, 2009
I'm using ThreadSafeClientConnManager to manage a pool of client connections, because my application has several threads, which are simultaneously connecting to a webserver.
Abstract sample code:
CODE:..............
Now lets say on of this threads is downloading a large file, but then the user of my application is switching to another activity/screen. Therefor the file is needless and I'd like to abort this download connection.
In ThreadSafeClientConnManager I found this method: public ClientConnectionRequest requestConnection (HttpRoute route, Object state) Returns a new ClientConnectionRequest, from which a ManagedClientConnection can be obtained or the request can be aborted.
So far I've been using:
CODE:.........
Now from what I understand, I've to use:
httpclient.getConnectionManager().requestConnection(HttpRoute route, Object state);
And that's the point where I'm stuck. I assume that for the route I can just use new HttpRoute(new HttpHost("10.0.0.1")) or whatever my server is, but what to put in for Object state?
And second, as soon as I've the ClientConnectionManager I can call getConnection(long timeout, TimeUnit tunit). But then from there, how I do I execute my HttpGet httpRequest = new HttpGet(URL_TO_FILE); as I did before with HttpResponse response = (HttpResponse) httpclient.execute(httpRequest);?
I've been gone through the documentation and tried out quite a few different things, but I wasn't able to obtain a working solution. Therefor any suggestions and/or code examples are more than welcome.
View 1 Replies
View Related
Sep 22, 2010
I'm developing an android video uploading app and uploading large amounts of video is a problem, I get different type of exception sometimes (host not resolved, pipe broken), I do a multipart POST but I have a feeling if I upload chunk of bytes one at at time that'll increase upload speed as well as solve connection timeout and these type of problems.
View 1 Replies
View Related
May 12, 2009
I am going to create an application via improving an existing code which has Apache License 2.0. In the license, it is implied that I need to attach "Notice" and "License" files for the previous code while distributing my new application.
Where is the best place to put these files, before publishing the new version on Android Market?
View 3 Replies
View Related
Apr 22, 2010
Are there any benefits to having a family plan over 2 individual lines? If we are both used to using up to 450 minutes, that's going to bump us to the 1400 minute plan, which is more than 2 individual lines. either that or suck it up and try to use less minutes to save ten bucks. Anything I am missing here. For some reason I was under the impression that these were a good deal over having 2 individual lines.
View 7 Replies
View Related
Jul 29, 2010
Would the process just require using the RUU to flash back to stock and waiting for the update? I am currently all the way rooted and running the Cyanogen nightly.
View 19 Replies
View Related
Nov 24, 2010
I just wanted to brag a little about my Aria.I have had it for almost two weeks now and I love it! I was a bit worried at first about the battery life.It seemed to deplete quickly.It was barely lasting a whole day. And that was with moderate use. I think a lot of that was due to the lack of signal where I work. It really drains the battery.I noticed the last couple of days the battery life getting better. I checked the battery monitor and it shows that I have been unplugged from the charger for 2 days and still have at least half my batter left.That is with moderate use. I set it so that everything is not always syncing. I think that helps a lot. Anway, I just wanted to share since there seems to be a lot of talk about the poor battery life. So far I've been impressed and happy with my little Aria!
View 4 Replies
View Related
Jul 22, 2010
HTC Focused On Improving Smartphone Battery Life Velocity - Forbes.com
View 39 Replies
View Related
Jul 19, 2010
they are splitting the company. The making of wireless-telecom equipment is being sold to Nokia Siemen's Networks. Does that concern any of you who just purchased the Droid X?
View 3 Replies
View Related
Jul 6, 2010
Who will take the battery life into consideration when buying a phone? In my opinion, most people who look out for phones do not consider battery life, most would consider stuff like technology, physical looks etc., but not battery life. Even if there are people who consider battery life, those are just the minority. Hence there are lots of controversy regarding the battery life. Most might agree that the battery is just right, however it is no surprise if people complain about battery life running out too quickly. Is technology improving but not batteries? It seems like phones are getting better everyday, but the battery life has like been stagnant.
View 9 Replies
View Related
Aug 28, 2009
Im on my 3rd Hero due to poor reception issues, after I recieved my 3rd handset and that too had poor reception (stuck in gprs too often, also complete signal loss sometimes) I complained again to Orange. when I said I either speak directly to Tech Support immediately (no phone back) or I cancel the contract (not fit for purpose).They connected me to Tech Support level 2, guy there said he was going to send a new SIM card out as the one in my phone is either moving (long shot) or is faulty, he also said with the high number of people complaining, it could be a bad batch of SIMs is out there.He asked that while i was awaiting delivery of the SIM to select 2G only in the phone settings to see if the phone stabilised, 2G only test failed, still saw complete signal loss on the odd occassion.I recieved my new SIM this morning and as soon it became active I seen signal strength I had not seen before on the Hero in the exact same locations where I had problems.Im seeing stable HSDPA with 3 bars where before in this exact location I had GPRSA/Signal Loss.
View 16 Replies
View Related
Jul 24, 2010
Hey guys, can you do me a favor and go to running services and flick up and down a few times and tell me if you ever get any lag when scrolling all the way up and down? I do every time I go into it and I just don't know if it is normal or not. I see little hickups here and there when I am scrolling but it's always noticeable in the running services screen.( I have LP set to high memory)I am wondering if I have an app slowing things down for me. My battery life hasn't been good either (4-5 hours per charge) and it seems my free memory is low. After a fresh reboot it is 97 + 124 in 34 -- other 87 in 9.I love the phone and would never give it up, but would love it more if it was a bit smoother and more battery life (like lots of others are seeming to get).
View 2 Replies
View Related
Oct 8, 2010
I converted a movie avi file to mp4 using the free "any video converter". As the converter's website recommends, I set the frame to 1280x720. But when watching the movie, they're is some chopiness and the quality is not as good like when watching a you tube clip in hd. Is there anything I can do to increase the video quality?
View 5 Replies
View Related
Jan 28, 2010
First off, let me just say that I recently switched over to the Droid from my Palm Pre on Sprint, which was a huge letdown for me. I'm loving my Droid so far and I just rooted it today with Sholes 1.2 ROM. I'm not that impatient to install a 2.1 ROM on my phone, as I already like 2.0.1 enough to keep it stock.I was curious about installing some of the 2.1 apps on it, which is why I ended up installing Sholes 1.2. However, I've noticed that it seems to take quite a bit of my memory compared to stock 2.0.1. In fact, it seems to run slower in general than the stock 2.0.1. Is there any way to improve this, or should I just wait for the 2.1 OTA?
View 10 Replies
View Related
Nov 25, 2009
1. The circle that rotates while something is loading should never stutter, if it does something is not as it should be. It should be in its own separate thread and have enough resources for its simple task.
2. Sometimes there is a lag between tapping an icon and the application launching. The phone should keep the yellow background under the icon that is about to launch until it is launched. That way the user would know that the press was registered and no additional press is needed.
In general it is preferable to sacrifice almost everything to maintain a responsive UI. If that means that applications will take longer to load or will run slower, fine.One thing that has been discovered with the web is that people don't mind waiting, but they do mind not having accurate and quick feedback about what they have done and what is going on.
View 1 Replies
View Related
Jun 12, 2010
I was setting up some photos for the Photo Caller ID function for incoming calls and was rather disappointed at the quality of the image that comes up. I either add an image to the contact in the People app or I go to the gallery and chose to "Set as" a contact icon. The picture pops up and you are given a little square crop/zoom tool to chose the portion of the picture that you want as you icon/photo caller ID. When I stretch the square OUT as big as possible to crop and then set the image with the contact, the caller ID image that comes up is good. However, any cropping/zooming is significantly Degrades/Pixelates the image that is chosen.
I'm not using the FULL 8MB resolution (set to 5MP) for the camera and I know if you crop and zoom any image, the more you zoom the worse the quality of the picture, But the 5MP shots I have should be MORE THAN sufficient to produce a little square of a photo caller ID. I had photo caller ID that popped up on my Palm Centro with photos was cropped to 320 x 320 and saved with LOW resolution and those photos were very clear. Even with the crop and zoom that is required to produce the contact/photo caller ID image, the 5MP photos I am using should be more than sufficient to produce a clear image. Is there a fix/trick for the quality to improve? Here we have this big beautiful screen and you crop a nice-sized 5MP picture for a tiny square caller ID photo and the quality is horrible.
View 8 Replies
View Related