State the difference between the SoundPool class and the MediaPlayer class.
Answers
Answered by
5
Answer:
Simply put, use SoundPool for short sounds, and use MediaPlayer for any long background music
Answered by
8
Answer: SoundPool
A SoundPool is a collection of samples that can be loaded into memory from a resource inside the APK or from a file in the file system, which means it is designed for short clips and it is best suited for sound effects.
MediaPlayer
MediaPlayer is designed for longer sound files or streams, this is best suited for music files or larger files. The files will be loaded from disk each time create is called, this will save on memory space but introduce a small delay.
Similar questions
Math,
9 days ago
English,
9 days ago
Physics,
18 days ago
Computer Science,
9 months ago
Psychology,
9 months ago