android-tone-player icon indicating copy to clipboard operation
android-tone-player copied to clipboard

No sound on later Android OS

Open SparkyNZ opened this issue 3 years ago • 0 comments

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)

SparkyNZ avatar Dec 11 '22 21:12 SparkyNZ