Skip to content

Instantly share code, notes, and snippets.

@julioz
Created June 14, 2018 13:44
Show Gist options
  • Save julioz/67c32cac0964de06e4533450c832bea8 to your computer and use it in GitHub Desktop.
Save julioz/67c32cac0964de06e4533450c832bea8 to your computer and use it in GitHub Desktop.
Fetch the optimal output sample rate for the Android device's DAC
val audioManager = context.getSystemService(Context.AUDIO_SERVICE) as AudioManager
val outputSampleRate = audioManager.getProperty(AudioManager.PROPERTY_OUTPUT_SAMPLE_RATE).toLong()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment