audioeffect

UnsupportedOperationException AudioEffect: invalid parameter operation

吃可爱长大的小学妹 提交于 2019-12-08 18:47:56
问题 I'm getting an UnsupportedOperationException error on an equalizer on this line of code. bassBoost.setStrength((short) bassBoostPos); Here's the code equalizer = new Equalizer(0, 0); if (equalizer != null) { equalizer.setEnabled (isEqualizer); numBands = equalizer.getNumberOfBands(); short r[] = equalizer.getBandLevelRange(); minLevel = r[0]; maxLevel = r[1]; bassBoost = new BassBoost (0, 0); if(bassBoost != null) { bassBoost.setEnabled(bassBoostPos > 0 ? true : false); bassBoost.setStrength(

Bass Boost not working in android

筅森魡賤 提交于 2019-12-07 22:38:01
问题 *when i run this code only simple sound is playing BassBoost is not working when change the seek bar,have i done anything wrong. how i have watched some tutorials in Google,on stack-overflow none of them were answered. player = MediaPlayer.create(getApplicationContext(), R.raw.song); player.start(); bb = new BassBoost(0, player.getAudioSessionId()); bb.setEnabled(true); player.setAuxEffectSendLevel(1.0f); bassbar.setOnSeekBarChangeListener(new OnSeekBarChangeListener() { @Override public void

Bass Boost not working in android

喜你入骨 提交于 2019-12-06 12:51:48
*when i run this code only simple sound is playing BassBoost is not working when change the seek bar,have i done anything wrong. how i have watched some tutorials in Google,on stack-overflow none of them were answered. player = MediaPlayer.create(getApplicationContext(), R.raw.song); player.start(); bb = new BassBoost(0, player.getAudioSessionId()); bb.setEnabled(true); player.setAuxEffectSendLevel(1.0f); bassbar.setOnSeekBarChangeListener(new OnSeekBarChangeListener() { @Override public void onStopTrackingTouch(SeekBar seekBar) { // TODO Auto-generated method stub } @Override public void

Android MediaPlayer with AudioEffect : Getting Error (-22,0)

元气小坏坏 提交于 2019-11-30 08:32:36
问题 Well, simply this is my requirement.. I have a WAV file, I want to open it, add some effects, and play. I am using MediaPlayer to play file, and PresetReverb to add some effects. This is my code public void playSound(){ String fullPath = MainActivity.this.filePath + "tmpaudio.wav"; final MediaPlayer player = new MediaPlayer(); player.setDataSource(this, Uri.parse(fullPath)); PresetReverb pReverb = new PresetReverb(0,player.getAudioSessionId()); pReverb.setPreset(PresetReverb.PRESET_LARGEROOM)

Equalizer not always supported, even when api >= 9?

自闭症网瘾萝莉.ら 提交于 2019-11-28 13:21:16
before enabling equalizer capabilities, I check for api level to make sure it's equal or greater than 9. From the reports I'm getting from my users, it seems that some exceptions are thrown anyway : the code eq = new Equalizer(0, mp.getAudioSessionId()) can raise : Caused by: java.lang.UnsupportedOperationException: Effect library not loaded at android.media.audiofx.AudioEffect.<init>(AudioEffect.java:355) at android.media.audiofx.Equalizer.<init>(Equalizer.java:149) and the code eq.getBandLevelRange() can raise : Caused by: java.lang.UnsupportedOperationException: AudioEffect: invalid

Equalizer not always supported, even when api >= 9?

百般思念 提交于 2019-11-27 07:45:56
问题 before enabling equalizer capabilities, I check for api level to make sure it's equal or greater than 9. From the reports I'm getting from my users, it seems that some exceptions are thrown anyway : the code eq = new Equalizer(0, mp.getAudioSessionId()) can raise : Caused by: java.lang.UnsupportedOperationException: Effect library not loaded at android.media.audiofx.AudioEffect.<init>(AudioEffect.java:355) at android.media.audiofx.Equalizer.<init>(Equalizer.java:149) and the code eq