Load a 16-bit WAVE file @ 44100Hz ONLY into memory. A sample ID number is returned if successful, otherwise -1
| 334 | // Load a 16-bit WAVE file @ 44100Hz ONLY into memory. A sample ID |
| 335 | // number is returned if successful, otherwise -1 |
| 336 | int SOUND::LoadAudioSample(std::string sWavFile, olc::ResourcePack *pack) |
| 337 | { |
| 338 | |
| 339 | olc::SOUND::AudioSample a(sWavFile, pack); |
| 340 | if (a.bSampleValid) |
| 341 | { |
| 342 | vecAudioSamples.push_back(a); |
| 343 | return (unsigned int)vecAudioSamples.size(); |
| 344 | } |
| 345 | else |
| 346 | return -1; |
| 347 | } |
| 348 | |
| 349 | // Add sample 'id' to the mixers sounds to play list |
| 350 | void SOUND::PlaySample(int id, bool bLoop) |