Created
May 29, 2011 11:36
-
-
Save jberkel/997676 to your computer and use it in GitHub Desktop.
mhd 2011 autotune intent code snippet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void process(File input) { | |
Intent process = new Intent(Intent.ACTION_SEND); | |
process.setType("audio/wav"); | |
process.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(input)); | |
Bundle config = new Bundle(); | |
config.putFloat("pitchShift", -1.0f); | |
config.putInt("sampleRate", 44100); | |
process.putExtra("autoTalentConfig", config); | |
startActivityForResult(Intent.createChooser(process, "Process Audio"), 0); | |
} | |
@Override protected void onActivityResult(int requestCode, int resultCode, Intent intent) { | |
if (resultCode == RESULT_OK) { | |
File result = new File(intent.getData().getPath()); | |
// do something with result | |
// | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment