Xojo Sound object from Memoryblock?

I need to play back PCM data from a Memoryblock, x-plat, for 64-bit builds.

For the past decade I’ve been using the OpenAL wrapper written by Thomas Cunningham and Roger Meier to do this, and it works flawlessly for 32-bit builds. It doesn’t work in 64-bit builds. (Development of the OpenAL library was abandoned years ago.)

The Xojo Sound object requires the resource to either be added to the project, or opened from a file. When working with PCM data in RAM, this requires adding audio headers and saving a file and loading it before a sound can be played. This is not an acceptable option especially on Mac because of all the security hoops Apple’s file system has become ridiculously slow.

I use MBS plugins, and I know there are classes for streaming audio, and I’ve used them, and they work, but they seem a bit overkill for simply playing back a chunk of PCM data in memory. I’m looking for an uncomplicated solution like I had with OpenAL, for 64-bits.

What I’d like is to be able to create a Xojo Sound object from a Memoryblock instead of a file. Even if I have to add WAV headers to the PCM, it would be better than having to save and load a file.

Maybe I’m missing something simple here … can I create a WAV file as a Folderitem in RAM, without saving and loading it, and open that?

Blackmagic Disk Speed Test.app (App Store, free) will give you the HD (or better, the SSD) speed in Read and Write.

A HD I was believing it be fast, was reported very slow (I do not know why),around 10MBs/s… instead of around 100MBs/s for more recents HD.