Closed aleclarson closed 5 years ago
I noticed in this documentation (which may be outdated), Apple says:
In OS X, Core Audio expects audio data to be in native-endian, 32-bit floating-point, linear PCM format.
Do you know if my .wav
files are required to meet these criteria?
Got it working with a bit depth of 32.
Hey @aleclarson , thanks for the comment on where you're using Starling, glad your issue was resolved. This library was thrown together a bit quickly for one of my personal projects and I haven't revisited it since then, but if anything else comes up during integration let me know and I'll help out if I can.
Hey, I'm working on a react-native-macos plugin that uses Starling: https://github.com/alloc/react-native-sound
I've patched Starling to support playing "raw data" (see here), but I'm getting an
EXC_BAD_ACCESS
error every time I try to play.wav
file data (loaded over-the-wire) from its generatedAVAudioPCMBuffer
object.I'm opening this issue to ask for advice on what I should do next. Do you think the
.wav
buffer needs a specific format for macOS, or perhaps it needs to be manually decoded first? Would you suggest I just save the data to a file and use theAVAudioFile
API instead? Or maybe I should just useAVAudioPlayer
instead ofAVAudioEngine
? Any suggestions would be great!I also created a SO thread for this: https://stackoverflow.com/questions/55306996/playing-wav-data-with-avaudioengine