GithubHelp home page GithubHelp logo

Comments (2)

VandanaYanamachintala avatar VandanaYanamachintala commented on June 13, 2024

/* Here one Burst is equal to 192 frames.*/
private int getBufferSizeInBursts(){
//This method will return the size of buffer from the buffer size spinner
@SuppressWarnings("unchecked")
HashMap<String,String> selectedOption = (HashMap<String,String>)
mBufferSizeSpinner.getSelectedItem();
//The buffer size value which is selected from the buffersize spinner is stored in the HashMap selectedOption as key value pair.
String valueKey = getString(R.string.buffer_size_value_key);
//buffer_size_value_key is the name of string which is declared in the strings.xml.

    // parseInt will throw a NumberFormatException if the string doesn't contain a valid integer 
    // representation. We don't need to worry about this because the values are derived from 
    // the BUFFER_SIZE_OPTIONS int array. 
    return Integer.parseInt(selectedOption.get(valueKey)); 

//From the HashMap selectedOption we are getting the value by using the key. Here both the //key and value are of type String. The value which is returned from the get fuction is given
// as input to the parseInt function which will convert the String to Integer value.
}

from android-audio-high-performance.

dturner avatar dturner commented on June 13, 2024

Thanks for your comments. I have updated the method docs.

from android-audio-high-performance.

Related Issues (20)

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.