BFileGameSound is for you. Keep in mind that if the sound needs to play at precise moments, or latency is an issue, that BFileGameSound may not be appropriate for your needs.BFileGameSound is easy, and it supports automatically looping sounds. The following code snippet starts up the theme music for the hot new game "Mystery Warriors From the Doomed Planet Z":BFileGameSound themeSong("music/theme.aif", true); themeSong.StartPlaying();
BFileGameSound by calling SetPaused(): themeSong.SetPaused(true, 0);
themeSong.SetPaused(true, 2);
themeSong.SetPaused(false, 0);
BFileGameSound uses the BMediaFile class to access the sound file. If BMediaFile can't identify the sound, the file is assumed to contain raw 44.1kHz, 16-bit stereo.