Check for SYS/GL during library init. Reason is that
[AROS.git] / workbench / devs / AHI / Device / misc.h
blobf816b8aac815686426fad757f327b97cc6adae86
1 /*
2 AHI - Hardware independent audio subsystem
3 Copyright (C) 1996-2005 Martin Blom <martin@blom.org>
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public
16 License along with this library; if not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330, Cambridge,
18 MA 02139, USA.
21 #ifndef ahi_misc_h
22 #define ahi_misc_h
24 #include <config.h>
26 #include <exec/lists.h>
27 #include <exec/nodes.h>
29 #include <stddef.h>
31 #include "ahi_def.h"
34 struct Node *
35 FindNode ( struct List *list,
36 struct Node *node );
38 int
39 Fixed2Shift( Fixed f );
41 void
42 ReqA( const char* text, APTR args );
44 #define Req(a0, args...) \
45 ({IPTR _args[] = { args }; ReqA((a0), (APTR)_args);})
47 char*
48 SprintfA( char *dst, const char *fmt, IPTR* args );
50 #define Sprintf(a0, a1, args...) \
51 ({IPTR _args[] = { args }; SprintfA((a0), (a1), (IPTR*)_args);})
55 void
56 AHIInitSemaphore( struct SignalSemaphore* ss );
58 void
59 AHIObtainSemaphore( struct SignalSemaphore* ss );
61 void
62 AHIReleaseSemaphore( struct SignalSemaphore* ss );
64 LONG
65 AHIAttemptSemaphore( struct SignalSemaphore* ss );
69 APTR
70 AHIAllocVec( ULONG byteSize,
71 ULONG requirements );
73 void
74 AHIFreeVec( APTR memoryBlock );
76 void*
77 AHILoadObject( const char* objname );
79 void
80 AHIUnloadObject( void* obj );
82 BOOL
83 AHIGetELFSymbol( const char* name,
84 void** ptr );
87 #if !defined( WORDS_BIGENDIAN )
88 void EndianSwap( size_t size, void* data );
89 #else
90 # define EndianSwap(s, x)
91 #endif
93 BOOL
94 PreTimerFunc( struct Hook* hook,
95 struct AHIPrivAudioCtrl* audioctrl,
96 void* null );
98 void
99 PostTimerFunc( struct Hook* hook,
100 struct AHIPrivAudioCtrl* audioctrl,
101 void* null );
103 BOOL
104 PreTimer( struct AHIPrivAudioCtrl* audioctrl );
106 void
107 PostTimer( struct AHIPrivAudioCtrl* audioctrl );
109 #endif /* ahi_misc_h */