¡@

Home 

2014/10/16 ¤W¤È 08:24:38

android Programming Glossary: soundpool

Uploading images to a PHP server from Android

http://stackoverflow.com/questions/2544517/uploading-images-to-a-php-server-from-android

better documented than plenty of public APIs cough cough SoundPool cough cough so it should be a pretty good place to start or..

Playing multiple sounds using SoundManager

http://stackoverflow.com/questions/3039078/playing-multiple-sounds-using-soundmanager

to play multiple sounds at once first you need to let the SoundPool know that. In the declaration of SoundPool notice that I specified.. need to let the SoundPool know that. In the declaration of SoundPool notice that I specified 20 streams. I have many guns and bad.. here and added the runnable kill queue myself. private SoundPool mSoundPool private HashMap Integer Integer mSoundPoolMap private..

Android SoundPool: get notified when end of played

http://stackoverflow.com/questions/4436055/android-soundpool-get-notified-when-end-of-played

SoundPool get notified when end of played This sound so simple that I.. share improve this question It can't be done with SoundPool as far as I can tell. The only audio 'player' that I know which.. is MediaPlayer it's more of a complex beast than SoundPool but allows setting an OnCompletionListener to be notified when..

Knowing if the loading of a sound with SoundPool has been successful on Android 1.6/2.0/2.1

http://stackoverflow.com/questions/4692572/knowing-if-the-loading-of-a-sound-with-soundpool-has-been-successful-on-android

if the loading of a sound with SoundPool has been successful on Android 1.6 2.0 2.1 On Android 2.2 there.. 1.6 2.0 2.1 On Android 2.2 there is something called SoundPool.OnLoadCompleteListener allowing to know whether a sound has.. load the sound once with MediaPlayer and if correct with SoundPool android soundpool share improve this question I implemented..

Playing sounds simultaneously Android

http://stackoverflow.com/questions/5957444/playing-sounds-simultaneously-android

them simultaneously. Right now when I call play on the SoundPool class the currently playing sound gets interrupted and the new.. sound effects. Thanks public class SoundManager private SoundPool mSoundPool private HashMap Integer Integer mSoundPoolMap private.. Thanks public class SoundManager private SoundPool mSoundPool private HashMap Integer Integer mSoundPoolMap private AudioManager..

Play sound with SoundPool

http://stackoverflow.com/questions/6396711/play-sound-with-soundpool

sound with SoundPool I need to play a short sound in my application. I wrote the.. import android.app.Activity import android.media.SoundPool import android.media.AudioManager import android.os.Bundle import.. activity is first created. private Button white private SoundPool spool private int soundID @Override public void onCreate Bundle..

Android: sound API (deterministic, low latency)

http://stackoverflow.com/questions/7266298/android-sound-api-deterministic-low-latency

ideas android android ndk share improve this question SoundPool is the lowest latency interface on most devices because the.. inter process communication. OpenSL is the best choice if SoundPool doesn't meet your needs. Why OpenSL AudioTrack and OpenSL have..

MediaPlayer.setDataSource causes IOException for valid file

http://stackoverflow.com/questions/9657280/mediaplayer-setdatasource-causes-ioexception-for-valid-file

seem to have a lot of problems with MediaPlayer and SoundPool when using simple codecs. Needs more researching... Even my..

Android : How to change Playback Rate of music using OpenSL ES

http://stackoverflow.com/questions/11094377/android-how-to-change-playback-rate-of-music-using-opensl-es

playback rate function in it android audio multimedia soundpool audiotrack share improve this question I have solved my..

Mixing Audio Files

http://stackoverflow.com/questions/2191408/mixing-audio-files

and playback of a single file. It would be cool if the soundpool let you grap the output as a IOStream but alas the SDK doesn't..

Heap size overflow issues with sound clips

http://stackoverflow.com/questions/2308850/heap-size-overflow-issues-with-sound-clips

up a whole new set of issues android memory management soundpool share improve this question Yes soundpool will keep all.. management soundpool share improve this question Yes soundpool will keep all the sounds in memory. A single instance of media..

Playing multiple sounds using SoundManager

http://stackoverflow.com/questions/3039078/playing-multiple-sounds-using-soundmanager

1 mSoundManager.playSound 2 android audio soundpool share improve this question mSoundManager.addSound 1 R.raw.dit..

Android SoundPool: get notified when end of played

http://stackoverflow.com/questions/4436055/android-soundpool-get-notified-when-end-of-played

the music has finished playing. Any ideas Jason android soundpool share improve this question It can't be done with SoundPool..

Knowing if the loading of a sound with SoundPool has been successful on Android 1.6/2.0/2.1

http://stackoverflow.com/questions/4692572/knowing-if-the-loading-of-a-sound-with-soundpool-has-been-successful-on-android

with MediaPlayer and if correct with SoundPool android soundpool share improve this question I implemented a kind of compatible.. soundPool Method called when determined that a soundpool sound has been loaded. @param soundPool The soundpool that.. a soundpool sound has been loaded. @param soundPool The soundpool that was given to the constructor of this OnLoadCompleteListener..

What is the best way to get an audio file duration in Android?

http://stackoverflow.com/questions/4709883/what-is-the-best-way-to-get-an-audio-file-duration-in-android

but got no answers. android audio media player duration soundpool share improve this question http blog.pocketjourney.com..

Play sound with SoundPool

http://stackoverflow.com/questions/6396711/play-sound-with-soundpool

this problem please Thank you in advance android audio soundpool share improve this question There might either be an issue..

How bad is Android SoundPool? What alternative to use?

http://stackoverflow.com/questions/6484574/how-bad-is-android-soundpool-what-alternative-to-use

Are there any other audio APIs I've missed android audio soundpool share improve this question Stick with OGG files and SoundPool..

android soundpool heapsize overflow

http://stackoverflow.com/questions/7428448/android-soundpool-heapsize-overflow

soundpool heapsize overflow I get this error hundreds of times when I.. req size 1052672 max size 1048576 android overflow soundpool share improve this question SoundPool is hard code the buffer..

How to properly use SoundPool on a game?

http://stackoverflow.com/questions/7437505/how-to-properly-use-soundpool-on-a-game

again it takes longer to initialize... very weird android soundpool share improve this question I solved the issue by playing..

Android: how to play music at maximum possible volume?

http://stackoverflow.com/questions/9599259/android-how-to-play-music-at-maximum-possible-volume

does this I'm using the MediaPlayer rather than the soundpool as this gives you a play complete callback which doesn't appear.. callback which doesn't appear to be present on the soundpool final AudioManager mAudioManager AudioManager getSystemService..

Issue with Soundpool and Samsung Galaxy S

http://stackoverflow.com/questions/4547551/issue-with-soundpool-and-samsung-galaxy-s

5 public static final int SOUND_MELT 6 private SoundPool soundPool private AudioManager mgr private HashMap Integer Integer soundPoolMap.. private AudioManager mgr private HashMap Integer Integer soundPoolMap private void initSounds soundPool new SoundPool 4 AudioManager.STREAM_MUSIC.. Integer Integer soundPoolMap private void initSounds soundPool new SoundPool 4 AudioManager.STREAM_MUSIC 100 soundPoolMap new..

Knowing if the loading of a sound with SoundPool has been successful on Android 1.6/2.0/2.1

http://stackoverflow.com/questions/4692572/knowing-if-the-loading-of-a-sound-with-soundpool-has-been-successful-on-android

mySoundPool @Override public void onLoadComplete SoundPool soundPool int soundId int status Log.i OnLoadCompleteListener Sound soundId.. If a sound is playable onLoadComplete is called. @param soundPool The SoundPool in which you loaded the sounds. public OnLoadCompleteListener.. loaded the sounds. public OnLoadCompleteListener SoundPool soundPool testSoundPool soundPool Method called when determined that..

Android:sound pool and service

http://stackoverflow.com/questions/5580537/androidsound-pool-and-service

final Random mGenerator new Random private SoundPool soundPool private HashMap Integer Integer soundsMap int SOUND1 1 int SOUND2.. onCreate TODO Auto generated method stub super.onCreate soundPool new SoundPool 4 AudioManager.STREAM_MUSIC 100 soundsMap new.. soundsMap new HashMap Integer Integer soundsMap.put SOUND1 soundPool.load this R.raw.baby_laugh 1 soundsMap.put SOUND2 soundPool.load..

android soundpool heapsize overflow

http://stackoverflow.com/questions/7428448/android-soundpool-heapsize-overflow

private static class SoundPoolContainer SoundPool soundPool Map String Integer soundMap AtomicInteger size public SoundPoolContainer.. soundMap AtomicInteger size public SoundPoolContainer this.soundPool new SoundPool MAX_STREAMS_PER_POOL android.media.AudioManager.STREAM_MUSIC.. String file try this.size.incrementAndGet soundMap.put id soundPool.load context.getAssets .openFd file 1 catch Exception e this.size.decrementAndGet..

Android, AsyncTask, check status?

http://stackoverflow.com/questions/7588584/android-asynctask-check-status

@Override protected Void doInBackground Void... unused soundPool new SoundPool 5 AudioManager.STREAM_MUSIC 100 soundPoolMap new.. soundPool new SoundPool 5 AudioManager.STREAM_MUSIC 100 soundPoolMap new HashMap Integer Integer soundPoolMap.put A1 soundPool.load.. 100 soundPoolMap new HashMap Integer Integer soundPoolMap.put A1 soundPool.load GameScreen_bugfix.this R.raw.a 1 soundPoolMap.put..

Uploading images to a PHP server from Android

http://stackoverflow.com/questions/2544517/uploading-images-to-a-php-server-from-android

helper library. See this post . At a quick glance it's better documented than plenty of public APIs cough cough SoundPool cough cough so it should be a pretty good place to start or possibly fine to just use a drop in solution. share improve..

Playing multiple sounds using SoundManager

http://stackoverflow.com/questions/3039078/playing-multiple-sounds-using-soundmanager

second line to mSoundManager.addSound 2 R.raw.dah In order to play multiple sounds at once first you need to let the SoundPool know that. In the declaration of SoundPool notice that I specified 20 streams. I have many guns and bad guys making noise.. In order to play multiple sounds at once first you need to let the SoundPool know that. In the declaration of SoundPool notice that I specified 20 streams. I have many guns and bad guys making noise in my game and each has a very short sound.. application will require a magic number. I found this source here and added the runnable kill queue myself. private SoundPool mSoundPool private HashMap Integer Integer mSoundPoolMap private AudioManager mAudioManager private Context mContext private..

Android SoundPool: get notified when end of played

http://stackoverflow.com/questions/4436055/android-soundpool-get-notified-when-end-of-played

SoundPool get notified when end of played This sound so simple that I can't figure out why I can't find the answer lol I have a working.. music has finished playing. Any ideas Jason android soundpool share improve this question It can't be done with SoundPool as far as I can tell. The only audio 'player' that I know which can provide a completion notification is MediaPlayer it's..

Knowing if the loading of a sound with SoundPool has been successful on Android 1.6/2.0/2.1

http://stackoverflow.com/questions/4692572/knowing-if-the-loading-of-a-sound-with-soundpool-has-been-successful-on-android

if the loading of a sound with SoundPool has been successful on Android 1.6 2.0 2.1 On Android 2.2 there is something called SoundPool.OnLoadCompleteListener allowing.. loading of a sound with SoundPool has been successful on Android 1.6 2.0 2.1 On Android 2.2 there is something called SoundPool.OnLoadCompleteListener allowing to know whether a sound has been loaded successfully or not. I am targeting lower API version.. by the user . What's the proper way to do it I hope not load the sound once with MediaPlayer and if correct with SoundPool android soundpool share improve this question I implemented a kind of compatible OnLoadCompleteListener class that..

Playing sounds simultaneously Android

http://stackoverflow.com/questions/5957444/playing-sounds-simultaneously-android

gun sounds explosions... etc. and I need to be able to play them simultaneously. Right now when I call play on the SoundPool class the currently playing sound gets interrupted and the new one starts to play. My SoundManager class is below as well.. as this is really my first game where I have needed this many sound effects. Thanks public class SoundManager private SoundPool mSoundPool private HashMap Integer Integer mSoundPoolMap private AudioManager mAudioManager private Context mContext public.. really my first game where I have needed this many sound effects. Thanks public class SoundManager private SoundPool mSoundPool private HashMap Integer Integer mSoundPoolMap private AudioManager mAudioManager private Context mContext public SoundManager..

Play sound with SoundPool

http://stackoverflow.com/questions/6396711/play-sound-with-soundpool

sound with SoundPool I need to play a short sound in my application. I wrote the following code but I have no sound and strange vibration appeared.. works well on my android simulator. My code is package com.samplers import android.app.Activity import android.media.SoundPool import android.media.AudioManager import android.os.Bundle import android.view.View import android.widget.Button public.. public class FixVibroActivity extends Activity Called when the activity is first created. private Button white private SoundPool spool private int soundID @Override public void onCreate Bundle savedInstanceState super.onCreate savedInstanceState setContentView..

Android: sound API (deterministic, low latency)

http://stackoverflow.com/questions/7266298/android-sound-api-deterministic-low-latency

over 100 ms most phones were in 180ms range. Anybody have ideas android android ndk share improve this question SoundPool is the lowest latency interface on most devices because the pool is stored in the audio process. All of the other audio.. in the audio process. All of the other audio paths require inter process communication. OpenSL is the best choice if SoundPool doesn't meet your needs. Why OpenSL AudioTrack and OpenSL have similar latencies with one important difference AudioTrack..

MediaPlayer.setDataSource causes IOException for valid file

http://stackoverflow.com/questions/9657280/mediaplayer-setdatasource-causes-ioexception-for-valid-file

claiming that many devs are using mostly OGG just that OGG doesn't seem to have a lot of problems with MediaPlayer and SoundPool when using simple codecs. Needs more researching... Even my book Beginning Android 4 Game Development depends on OGG files...

Android : How to change Playback Rate of music using OpenSL ES

http://stackoverflow.com/questions/11094377/android-how-to-change-playback-rate-of-music-using-opensl-es

feature in this example. Can anyone show me how do I add change playback rate function in it android audio multimedia soundpool audiotrack share improve this question I have solved my problem. Here is my complete native code for OpenSL ES in case..

Mixing Audio Files

http://stackoverflow.com/questions/2191408/mixing-audio-files

you to manage multiple files rather than doing mixdowns and playback of a single file. It would be cool if the soundpool let you grap the output as a IOStream but alas the SDK doesn't seem to allow it. Further it would be nice if the AudioRecorder..

Heap size overflow issues with sound clips

http://stackoverflow.com/questions/2308850/heap-size-overflow-issues-with-sound-clips

the user wishes to go back to the menu or would this bring up a whole new set of issues android memory management soundpool share improve this question Yes soundpool will keep all the sounds in memory. A single instance of media player would.. would this bring up a whole new set of issues android memory management soundpool share improve this question Yes soundpool will keep all the sounds in memory. A single instance of media player would probably be all you need see here . You should..

Playing multiple sounds using SoundManager

http://stackoverflow.com/questions/3039078/playing-multiple-sounds-using-soundmanager

new OnClickListener public void onClick View v mSoundManager.playSound 1 mSoundManager.playSound 2 android audio soundpool share improve this question mSoundManager.addSound 1 R.raw.dit mSoundManager.addSound 1 R.raw.dah You need to change..

Android SoundPool: get notified when end of played

http://stackoverflow.com/questions/4436055/android-soundpool-get-notified-when-end-of-played

2 others . problem is I can't find a way to get notified that the music has finished playing. Any ideas Jason android soundpool share improve this question It can't be done with SoundPool as far as I can tell. The only audio 'player' that I know..

Knowing if the loading of a sound with SoundPool has been successful on Android 1.6/2.0/2.1

http://stackoverflow.com/questions/4692572/knowing-if-the-loading-of-a-sound-with-soundpool-has-been-successful-on-android

What's the proper way to do it I hope not load the sound once with MediaPlayer and if correct with SoundPool android soundpool share improve this question I implemented a kind of compatible OnLoadCompleteListener class that works at least for.. public OnLoadCompleteListener SoundPool soundPool testSoundPool soundPool Method called when determined that a soundpool sound has been loaded. @param soundPool The soundpool that was given to the constructor of this OnLoadCompleteListener.. testSoundPool soundPool Method called when determined that a soundpool sound has been loaded. @param soundPool The soundpool that was given to the constructor of this OnLoadCompleteListener @param soundId The soundId of the sound that loaded @param..

What is the best way to get an audio file duration in Android?

http://stackoverflow.com/questions/4709883/what-is-the-best-way-to-get-an-audio-file-duration-in-android

... On a side note this question has already been asked but got no answers. android audio media player duration soundpool share improve this question http blog.pocketjourney.com 2008 04 04 tutorial custom media streaming for androids mediaplayer..

Play sound with SoundPool

http://stackoverflow.com/questions/6396711/play-sound-with-soundpool

spool.play soundID volume volume 1 0 1f Help me to solve this problem please Thank you in advance android audio soundpool share improve this question There might either be an issue with your volume control or with your sound file playing..

How bad is Android SoundPool? What alternative to use?

http://stackoverflow.com/questions/6484574/how-bad-is-android-soundpool-what-alternative-to-use

for SoundPool . But does it support the features that I need Are there any other audio APIs I've missed android audio soundpool share improve this question Stick with OGG files and SoundPool will do you just fine. It's the nature of the multi platform..

android soundpool heapsize overflow

http://stackoverflow.com/questions/7428448/android-soundpool-heapsize-overflow

soundpool heapsize overflow I get this error hundreds of times when I run in Debug it doesn't seem to affect the program but how.. posts 09 15 09 03 09.190 ERROR AudioCache 34 Heap size overflow req size 1052672 max size 1048576 android overflow soundpool share improve this question SoundPool is hard code the buffer size as 1M for all loaded file. So you probably will get..

How to properly use SoundPool on a game?

http://stackoverflow.com/questions/7437505/how-to-properly-use-soundpool-on-a-game

playing SoundPool is resetting and when it is going to play again it takes longer to initialize... very weird android soundpool share improve this question I solved the issue by playing a muted sound in loop mSoundPool.play id 0 0 1 1 1f The lag..

Android: how to play music at maximum possible volume?

http://stackoverflow.com/questions/9599259/android-how-to-play-music-at-maximum-possible-volume

I think I was beaten to the punch ahh well Some code that actually does this I'm using the MediaPlayer rather than the soundpool as this gives you a play complete callback which doesn't appear to be present on the soundpool final AudioManager mAudioManager.. rather than the soundpool as this gives you a play complete callback which doesn't appear to be present on the soundpool final AudioManager mAudioManager AudioManager getSystemService AUDIO_SERVICE final int originalVolume mAudioManager.getStreamVolume..

Issue with Soundpool and Samsung Galaxy S

http://stackoverflow.com/questions/4547551/issue-with-soundpool-and-samsung-galaxy-s

final int SOUND_MAGIC 4 public static final int SOUND_ROCKET 5 public static final int SOUND_MELT 6 private SoundPool soundPool private AudioManager mgr private HashMap Integer Integer soundPoolMap private void initSounds soundPool new SoundPool 4.. static final int SOUND_MELT 6 private SoundPool soundPool private AudioManager mgr private HashMap Integer Integer soundPoolMap private void initSounds soundPool new SoundPool 4 AudioManager.STREAM_MUSIC 100 soundPoolMap new HashMap Integer Integer.. SoundPool soundPool private AudioManager mgr private HashMap Integer Integer soundPoolMap private void initSounds soundPool new SoundPool 4 AudioManager.STREAM_MUSIC 100 soundPoolMap new HashMap Integer Integer soundPoolMap.put SOUND_EXPLOSION..

Knowing if the loading of a sound with SoundPool has been successful on Android 1.6/2.0/2.1

http://stackoverflow.com/questions/4692572/knowing-if-the-loading-of-a-sound-with-soundpool-has-been-successful-on-android

completionListener new OnLoadCompleteListener mySoundPool @Override public void onLoadComplete SoundPool soundPool int soundId int status Log.i OnLoadCompleteListener Sound soundId loaded. int soundId mySoundPool.load this R.raw.funnyvoice.. soundId to periodically test sound load completion. If a sound is playable onLoadComplete is called. @param soundPool The SoundPool in which you loaded the sounds. public OnLoadCompleteListener SoundPool soundPool testSoundPool soundPool.. is called. @param soundPool The SoundPool in which you loaded the sounds. public OnLoadCompleteListener SoundPool soundPool testSoundPool soundPool Method called when determined that a soundpool sound has been loaded. @param soundPool The soundpool..

Android:sound pool and service

http://stackoverflow.com/questions/5580537/androidsound-pool-and-service

IBinder mBinder new LocalBinder Random number generator private final Random mGenerator new Random private SoundPool soundPool private HashMap Integer Integer soundsMap int SOUND1 1 int SOUND2 2 @Override public void onCreate TODO Auto generated.. soundsMap int SOUND1 1 int SOUND2 2 @Override public void onCreate TODO Auto generated method stub super.onCreate soundPool new SoundPool 4 AudioManager.STREAM_MUSIC 100 soundsMap new HashMap Integer Integer soundsMap.put SOUND1 soundPool.load.. soundPool new SoundPool 4 AudioManager.STREAM_MUSIC 100 soundsMap new HashMap Integer Integer soundsMap.put SOUND1 soundPool.load this R.raw.baby_laugh 1 soundsMap.put SOUND2 soundPool.load this R.raw.touchdown 1 public void playSound int sound..

android soundpool heapsize overflow

http://stackoverflow.com/questions/7428448/android-soundpool-heapsize-overflow

for SoundPoolContainer container containers container.onResume private static class SoundPoolContainer SoundPool soundPool Map String Integer soundMap AtomicInteger size public SoundPoolContainer this.soundPool new SoundPool MAX_STREAMS_PER_POOL.. SoundPoolContainer SoundPool soundPool Map String Integer soundMap AtomicInteger size public SoundPoolContainer this.soundPool new SoundPool MAX_STREAMS_PER_POOL android.media.AudioManager.STREAM_MUSIC 0 this.soundMap new ConcurrentHashMap String.. AtomicInteger 0 public void load Context context String id String file try this.size.incrementAndGet soundMap.put id soundPool.load context.getAssets .openFd file 1 catch Exception e this.size.decrementAndGet Log.w TAG Load sound error e public void..

Android, AsyncTask, check status?

http://stackoverflow.com/questions/7588584/android-asynctask-check-status

class LoadMusicInBackground extends AsyncTask Void String Void @Override protected Void doInBackground Void... unused soundPool new SoundPool 5 AudioManager.STREAM_MUSIC 100 soundPoolMap new HashMap Integer Integer soundPoolMap.put A1 soundPool.load.. Void @Override protected Void doInBackground Void... unused soundPool new SoundPool 5 AudioManager.STREAM_MUSIC 100 soundPoolMap new HashMap Integer Integer soundPoolMap.put A1 soundPool.load GameScreen_bugfix.this R.raw.a 1 soundPoolMap.put A3.. Void... unused soundPool new SoundPool 5 AudioManager.STREAM_MUSIC 100 soundPoolMap new HashMap Integer Integer soundPoolMap.put A1 soundPool.load GameScreen_bugfix.this R.raw.a 1 soundPoolMap.put A3 soundPool.load GameScreen_bugfix.this R.raw.b..