Giter VIP home page Giter VIP logo

android-tone-player's Introduction

android-tone-player's People

Contributors

ethomas997 avatar m-abboud avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

android-tone-player's Issues

ContinuousBuzzer tone stopping

No matter if you pause the thread, or set pause intervals. The tone will stop in a few seconds.
OneTimeBuffer is working well.

Any way to smoothly change volume or frequency during playback?

Thanks for this lib.

I was wondering if there is a way to increase/decrease volume or frequency during playback.

So far I manage to do this using ContinuousBuzzer and setting buzzer.setPausePeriodSeconds(1);

Then on button click event I increase the volume (or frequency) like this buzzer.setToneFreqInHz(freq+=30);

Which works but I experience clipping issues every 1 seconds (which is kind of expected I guess since the playback stops and restarts every 1 secs)

So I guess my question comes down to whether I can control volume or frequency in a smooth continuous sound without clipping issues or interruptions.

Concurrency problems

Player state is modified both on the main thread and the background player thread. A specific example where this is a problem: calling #play ends up starting a thread that modifies the audioTrack instance field, and calling #stop modifies the same instance field on whatever thread it's called from (probably the main thread). This will result in NPEs if you play / stop with the correct timing.

Why LGPL? Why Not Apache 2.0?

I want to use this library in my project but can't because I don't want to share my source codes but according to LGPL I should. Is it possible to make it Apache 2.0?

No sound on later Android OS

I get no sound from this or other examples on the web using AudioTrack to play back samples. I see this error in the logcat but I cannot make any sense of what needs to be changed.

12-09 17:09:28.451 25540 25575 W AudioTrack: Use of stream types is deprecated for operations other than volume control
12-09 17:09:28.452 25540 25575 W AudioTrack: See the documentation of AudioTrack() for what to use instead with android.media.AudioAttributes to qualify your playback use case

I've had a look at the below Android developer documentation page and I still have no idea:

https://developer.android.com/reference/android/media/AudioTrack#AudioTrack(android.media.AudioAttributes,%20android.media.AudioFormat,%20int,%20int,%20int)

Request to develop custom library

Hi Maddie. We are looking for developer to make similar library for Android you made but with larger set or functional. Would you be interested to work on short term project?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.