Computer Science, asked by Anonymous, 18 days ago

State the difference between the SoundPool class and the MediaPlayer class.​

Answers

Answered by dg2748391
5

Answer:

Simply put, use SoundPool for short sounds, and use MediaPlayer for any long background music

Answered by ParikshitPulliwar
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