Import Amiga applications and desktop tools

This commit is contained in:
Alberto committed 2026-11-11 16:21:50 +01:00
commit 1c144c9a3c
347 files changed
+423483

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
#include "bell.c"
#include <proto/dos.h>
struct GfxBase *GfxBase;
int main(void){FILE*f=fopen("PROGDIR:bell-test.log","w");int i,error=99,started;ULONG unit,period;
if(!f)return 20;GfxBase=(struct GfxBase*)OpenLibrary("graphics.library",40);
if(!GfxBase){fprintf(f,"Graphics library unavailable.\n");fclose(f);return 20;}
if(!bell_init()){fprintf(f,"Sample/device resources unavailable.\n");fclose(f);CloseLibrary((struct Library*)GfxBase);return 20;}
bell_play(0);started=active;unit=(ULONG)audio->ioa_Request.io_Unit;period=audio->ioa_Period;unit=allocated;
for(i=0;active&&i<100;i++){
if(CheckIO((struct IORequest*)audio))error=audio->ioa_Request.io_Error;
bell_poll();if(active)Delay(1);
}
fprintf(f,"Started=%d completed=%d audio.device error=%d length=%lu volume=18/64 stereo\n",started,!active,error,length);fprintf(f,"poll_ticks=%d unit_mask=%lu period=%lu\n",i,unit,period);
bell_exit();CloseLibrary((struct Library*)GfxBase);fclose(f);return started&&!active&&error==0?0:20;
}