Is it possible to use AVAudioPlayer to play custom sounds (e.g. I will generate sine wave and then play it)?
The docs say that AVAudioPlayer can be used to:
Play sounds from files or memory buffers
But I can’t find example of playing custom generated sounds, only memory buffers that are loaded from file or the internet. Is it possible and where can I find more?
Thanks 🙂
After extensive searches (both searching the documentation and googling) I’ve concluded that this:
refers to memory buffer that contains formatted audio data. If you have MP3 on your disk or somewhere on the internet, you can load it into memory buffer and then play it. That’s what they meant. If you want to play your generated sounds, you can use OpenAL or AudioUnits.