nisrulz / zentone Goto Github PK
View Code? Open in Web Editor NEW:sound: [Android Library] Easily generate audio tone of a specific frequency and volume in Android.
Home Page: http://nisrulz.github.io/zentone
License: Apache License 2.0
:sound: [Android Library] Easily generate audio tone of a specific frequency and volume in Android.
Home Page: http://nisrulz.github.io/zentone
License: Apache License 2.0
I wanted to play sound for long time period so I tried TimeUnit.MINUTES.toSeconds(100)
That caused OOM because of allocation too much memory.
Hi is there support for intergration with perhaps SoundPool to play in stereo rather than just playing it in mono
What a wonderful library. Very easy to use. kudos
Just a suggestion, can we remove the duration? We will just generate the tune on MotionEvent.ACTION_DOWN and stop the tune until the user unpressed the button (MotionEvent.ACTION_UP).
` findViewById(R.id.play_tune_button).setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
if (motionEvent.getAction() == MotionEvent.ACTION_DOWN){
Log.w("Pressed", "Button ACTION_DOWN1");
generateSound(261);
}
else if (motionEvent.getAction() == MotionEvent.ACTION_UP){
Log.w("Pressed", "Button ACTION_UP1");
stopSound();
}
return false;
}
});`
JFrog just announced that they'll be shutting down JCenter:
https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/
Key dates are:
February 28th: No more submissions will be accepted to Bintray, JCenter
May 1st: Bintray, JCenter services will no longer be available
Hence need to migrate to another maven repository like Maven central.
Is there any way i could set the duration of the playback to milliseconds?
I've tried the following
new ZenTone().play(frequency = 200f, volume = 100)
new ZoneTone(encoding = AudioFormat.ENCODING_PCM_32BIT, channelMask = AudioFormat.CHANNEL_OUT_STEREO)
But the resulting sound, doesn't sound like the other tone generators. They all sound like this: (https://www.youtube.com/watch?v=YOnBu8CClmQ)
What am I doing wrong here?
Can't generate two tone frequency at the same time
ZenTone.getInstance().generate(300, 2, 0.5f, toneStoppedListener());
ZenTone.getInstance().generate(500, 2, 0.5f, toneStoppedListener());
In onResume I play a sound. In onStop I call stop(). That has no effect and the sound keeps playing.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.