Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Android
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
Ron McLeod
paul wheaton
Jeanne Boyarsky
Sheriffs:
Paul Clapham
Devaka Cooray
Saloon Keepers:
Tim Holloway
Roland Mueller
Himai Minh
Bartenders:
Forum:
Android
how to attacth effect to audiotrack
john bean
Ranch Hand
Posts: 107
posted 9 months ago
Number of slices to send:
Optional 'thank-you' note:
Send
hi i am trying to attach effect to system sound i get no errors but the effect does not work
AudioTrack audioTrack = new AudioTrack(AudioManager.STREAM_MUSIC, 11025, AudioFormat.CHANNEL_CONFIGURATION_STEREO, AudioFormat.ENCODING_PCM_16BIT, 100, sessionId); PresetReverb reverb = new PresetReverb(1, sessionId);//was 0 View rOff=view.findViewById(R.id.revoff); rOff.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { audioTrack.setVolume(1.0f); reverb.setEnabled(false); } }); View smallroom=view.findViewById(R.id.smroom); smallroom.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { audioTrack.attachAuxEffect(reverb.getId()); reverb.setPreset(PresetReverb.PRESET_SMALLROOM); reverb.setEnabled(true); audioTrack.setAuxEffectSendLevel(1.0f); audioTrack.setVolume(0.3f); } });
it gives no errors in log cat not sure why it does not apply
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
how to find view from fragment
android audio effects
Need Help on the scrolling Bar in Android?
how to clear an edittext by cross button in the right side
Help With My Android Calculator Project
More...