Alternative to CF_WAVE audio clipboard

FL Studio SDK and related information for developers. To ask questions please use FL Studio Looptalk

Return to “Developer Arena”

[You can only see part of this thread as you are not logged in to the forums]
Thu Aug 07, 2008 5:42 pm

0 x

Alternative to CF_WAVE audio clipboard

Windows has a predefined CF_WAVE clipboard format, the content of the clipboard being simply in wav format. Not many audio editors seem to support it, but some do.

2 problems with this clipboard:

-there seems to be a (rather random) limit as for the size of the data. I've seen the clipboard refuse memory blocks from 50MB to 20MB, which is pretty low for audio. This limit seems to shrink over time.

-the whole data has to be in RAM (it can't be streamed), and can be huge (maybe that's the reason for the size limit).

So I'm suggesting an elegant & easy solution, which will be implemented in the next release of FL's Edison. I'm suggesting it here since it's basically made to share audio with other tools, feel free to support it if you want.

The format is registered (RegisterClipboardFormat) as "Audio clipboard file".
The structure of the data is this simple:
DWORD Version; // must be zero

FileName being a null-terminated name for the audio wav file, which can be anywhere (but I suggest 'Audio clipboard.wav' in the windows temp directory, to write to the clipboard).

So you check if the "Audio clipboard file" format is in the clipboard, you read the structure, you get the filename out of the structure, and you load the wave file.

Return to “Developer Arena”