AudioToClip is a console tool for MorphOS. Its purpose is to put any audio file recognizable by Reggae framework into the system clipboard. Audio data is put into an AIFF container, as it is the standard clipboard format for audio data in MorphOS. The tool has been written for testing system clipboard support in DigiBooster 3. The program is distributed as freeware with full source code on BSD two-clause license.
AudioToClip FILE/A, UNIT/N
- FILE – A patch to an audio file. The file must be recognizable by Reggae (see list of supported formats).
- UNIT – Optional clipboard unit number from 0 to 255. The default is unit 0.
Put contents of "sample.mp3" into the default clipboard unit 0:
Put some WAVE file into the clipboard unit 2:
AudioToClip somefile.wav 2
AudioToClip puts the data into the system clipboard in the proper way, through clipboard.device. There are known old, broken tools, which try to "guess" the location of clipboard files and write them directly. It not only may break forward compatibility in the future, but also damages advanced clipboard features, like clip change notifications, or data posting mechanism. The source code of this tool is meant to be a programming example how to access the clipbpard properly, it also serves as another Reggae example.
Version 1.1 (2011-11-25) fixed one obvious bug. A processing memory buffer was not freed at all. I've also included sources of libvstring, my small link library easing dynamic string handling in C. With some fixes in the makefile, now the code can be really built by anyone.
Version 1.0 (2011-11-13) was the first release.