Audio
AudioToClip
Small tool for putting audio data into the system clipboard
Grzegorz Kraszewski

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.

Download

AudioToClip 1.1 (12 kB) for MorphOS 2.x, on MorphOS Files. The source code is included inside the archive.

Arguments

Usage: AudioToClip FILE/A, UNIT/N

Examples

Put contents of "sample.mp3" into the default clipboard unit 0:

AudioToClip sample.mp3

Put some WAVE file into the clipboard unit 2:

AudioToClip somefile.wav 2

Notes

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.

History

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.

Last updated: November 25-th, 2011.