API Level 21부터 deprecated 되었다.
왜 deprecated 되었는지는 stackFlow에 어떤 분이 답변을 달아주셨다.
https://stackoverflow.com/questions/39184157/android-why-is-the-constructor-for-soundpool-deprecated
기존 SouncPool 생성자에는 maxStreams, streamType, srcQuality가 들어갔다.
하지만, maxStreams는 이제 명시적으로 설정할 필요가 없고, streamType을 쓰는 것보다 AudioAttributes를 사용하면 더 많은 세팅값을 줄 수 있고, srcQuality 매개변수는 없어졌기 때문에 SoundPool 생성자를 쓰는 것보다 SoundPool.Builder를 쓰는 것이 더 낫다...!
'프로그래밍 > Android' 카테고리의 다른 글
Android Studio Project명 바꾸기 (0) | 2024.03.18 |
---|---|
[HTTP 통신 라이브러리] OkHttp와 Retrofit (0) | 2024.03.11 |
getColor(), getDrawable() deprecated 해결 (1) | 2024.03.06 |
[Kotlin] Android Studio 커스텀 프로그래스바 만들기 (Custom Progress bar) (0) | 2024.03.02 |
[Kotlin] Android Studio 계산기 만들기 (feat. MVVM) (0) | 2024.02.08 |